summaryrefslogtreecommitdiffstats
path: root/Include/classobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-12 11:45:45 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-12 11:45:45 (GMT)
commitcaa63808861d4e92d4dc1005fc01de0f2e4a8fd0 (patch)
tree3771531169ab510aca9b69cdc4d9de2b5c8810c4 /Include/classobject.h
parent94390ec2a6ea5acbea9dead528ce067c396a0301 (diff)
downloadcpython-caa63808861d4e92d4dc1005fc01de0f2e4a8fd0.zip
cpython-caa63808861d4e92d4dc1005fc01de0f2e4a8fd0.tar.gz
cpython-caa63808861d4e92d4dc1005fc01de0f2e4a8fd0.tar.bz2
The great renaming, phase two: all header files have been updated to
use the new names exclusively, and the linker will see the new names. Files that import "Python.h" also only see the new names. Files that import "allobjects.h" will continue to be able to use the old names, due to the inclusion (in allobjects.h) of "rename2.h".
Diffstat (limited to 'Include/classobject.h')
-rw-r--r--Include/classobject.h52
1 files changed, 27 insertions, 25 deletions
diff --git a/Include/classobject.h b/Include/classobject.h
index e0e46c5..9c4bc51 100644
--- a/Include/classobject.h
+++ b/Include/classobject.h
@@ -39,40 +39,42 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Revealing some structures (not for general use) */
typedef struct {
- OB_HEAD
- object *cl_bases; /* A tuple of class objects */
- object *cl_dict; /* A dictionary */
- object *cl_name; /* A string */
+ PyObject_HEAD
+ PyObject *cl_bases; /* A tuple of class objects */
+ PyObject *cl_dict; /* A dictionary */
+ PyObject *cl_name; /* A string */
/* The following three are functions or NULL */
- object *cl_getattr;
- object *cl_setattr;
- object *cl_delattr;
-} classobject;
+ PyObject *cl_getattr;
+ PyObject *cl_setattr;
+ PyObject *cl_delattr;
+} PyClassObject;
typedef struct {
- OB_HEAD
- classobject *in_class; /* The class object */
- object *in_dict; /* A dictionary */
-} instanceobject;
+ PyObject_HEAD
+ PyClassObject *in_class; /* The class object */
+ PyObject *in_dict; /* A dictionary */
+} PyInstanceObject;
-extern DL_IMPORT typeobject Classtype, Instancetype, Instancemethodtype;
+extern DL_IMPORT PyTypeObject PyClass_Type, PyInstance_Type, PyMethod_Type;
-#define is_classobject(op) ((op)->ob_type == &Classtype)
-#define is_instanceobject(op) ((op)->ob_type == &Instancetype)
-#define is_instancemethodobject(op) ((op)->ob_type == &Instancemethodtype)
+#define PyClass_Check(op) ((op)->ob_type == &PyClass_Type)
+#define PyInstance_Check(op) ((op)->ob_type == &PyInstance_Type)
+#define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type)
-extern object *newclassobject PROTO((object *, object *, object *));
-extern object *newinstanceobject PROTO((object *, object *));
-extern object *newinstancemethodobject PROTO((object *, object *, object *));
+extern PyObject *PyClass_New Py_PROTO((PyObject *, PyObject *, PyObject *));
+extern PyObject *PyInstance_New Py_PROTO((PyObject *, PyObject *));
+extern PyObject *PyMethod_New Py_PROTO((PyObject *, PyObject *, PyObject *));
-extern object *instancemethodgetfunc PROTO((object *));
-extern object *instancemethodgetself PROTO((object *));
-extern object *instancemethodgetclass PROTO((object *));
+extern PyObject *PyMethod_Function Py_PROTO((PyObject *));
+extern PyObject *PyMethod_Self Py_PROTO((PyObject *));
+extern PyObject *PyMethod_Class Py_PROTO((PyObject *));
-extern int issubclass PROTO((object *, object *));
+extern int PyClass_IsSubclass Py_PROTO((PyObject *, PyObject *));
-extern object *instancebinop PROTO((object *, object *, char *, char *,
- object * (*) PROTO((object *, object *)) ));
+extern PyObject *instancebinop
+ Py_PROTO((PyObject *, PyObject *,
+ char *, char *,
+ PyObject * (*) Py_PROTO((PyObject *, PyObject *)) ));
#ifdef __cplusplus
}