summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-08-12 15:35:34 (GMT)
committerGuido van Rossum <guido@python.org>1992-08-12 15:35:34 (GMT)
commit04691fc1c1bb737c0db772f5c1ea697a351a01d9 (patch)
tree80d559ec0adb25dd1774638ebb0f2bc8aa8afc67 /Include
parent423d6c6bcae783f8ebfcb0b692059eb294ab14dd (diff)
downloadcpython-04691fc1c1bb737c0db772f5c1ea697a351a01d9.zip
cpython-04691fc1c1bb737c0db772f5c1ea697a351a01d9.tar.gz
cpython-04691fc1c1bb737c0db772f5c1ea697a351a01d9.tar.bz2
Changes so that user-defined classes can implement operations invoked
by special syntax: you can now define your own numbers, sequences and mappings.
Diffstat (limited to 'Include')
-rw-r--r--Include/ceval.h6
-rw-r--r--Include/classobject.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/Include/ceval.h b/Include/ceval.h
index d9708a2..dc31255 100644
--- a/Include/ceval.h
+++ b/Include/ceval.h
@@ -77,13 +77,13 @@ void flushline PROTO((void));
*/
extern void init_save_thread PROTO((void));
-extern void *save_thread PROTO((void));
-extern void restore_thread PROTO((void *));
+extern object *save_thread PROTO((void));
+extern void restore_thread PROTO((object *));
#ifdef USE_THREAD
#define BGN_SAVE { \
- void *_save; \
+ object *_save; \
_save = save_thread();
#define RET_SAVE restore_thread(_save);
#define RES_SAVE _save = save_thread();
diff --git a/Include/classobject.h b/Include/classobject.h
index 7dd66e7..1d24a7c 100644
--- a/Include/classobject.h
+++ b/Include/classobject.h
@@ -42,3 +42,6 @@ extern object *newinstancemethodobject PROTO((object *, object *));
extern object *instancemethodgetfunc PROTO((object *));
extern object *instancemethodgetself PROTO((object *));
+
+extern int instance_coerce PROTO((object **, object **));
+extern object *instance_convert PROTO((object *, char *));