6 #ifndef Py_CLASSOBJECT_H
7 #define Py_CLASSOBJECT_H
41 #define PyClass_Check(op) ((op)->ob_type == &PyClass_Type)
42 #define PyInstance_Check(op) ((op)->ob_type == &PyInstance_Type)
43 #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type)
46 PyAPI_FUNC(PyObject *) PyInstance_New(PyObject *, PyObject *,
48 PyAPI_FUNC(PyObject *) PyInstance_NewRaw(PyObject *, PyObject *);
49 PyAPI_FUNC(PyObject *) PyMethod_New(PyObject *, PyObject *, PyObject *);
51 PyAPI_FUNC(PyObject *) PyMethod_Function(PyObject *);
52 PyAPI_FUNC(PyObject *) PyMethod_Self(PyObject *);
53 PyAPI_FUNC(PyObject *) PyMethod_Class(PyObject *);
69 #define PyMethod_GET_FUNCTION(meth) \
70 (((PyMethodObject *)meth) -> im_func)
71 #define PyMethod_GET_SELF(meth) \
72 (((PyMethodObject *)meth) -> im_self)
73 #define PyMethod_GET_CLASS(meth) \
74 (((PyMethodObject *)meth) -> im_class)
76 PyAPI_FUNC(
int) PyClass_IsSubclass(PyObject *, PyObject *);