1- #ifndef Py_CLASSOBJECT_H
2- #define Py_CLASSOBJECT_H
3- #ifdef __cplusplus
4- extern "C" {
5- #endif
6-
71/***********************************************************
82Copyright (c) 2000, BeOpen.com.
93Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -18,28 +12,34 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
1812
1913/* Revealing some structures (not for general use) */
2014
15+ #ifndef Py_CLASSOBJECT_H
16+ #define Py_CLASSOBJECT_H
17+ #ifdef __cplusplus
18+ extern "C" {
19+ #endif
20+
2121typedef struct {
22- PyObject_HEAD
23- PyObject * cl_bases ; /* A tuple of class objects */
24- PyObject * cl_dict ; /* A dictionary */
25- PyObject * cl_name ; /* A string */
26- /* The following three are functions or NULL */
27- PyObject * cl_getattr ;
28- PyObject * cl_setattr ;
29- PyObject * cl_delattr ;
22+ PyObject_HEAD
23+ PyObject * cl_bases ; /* A tuple of class objects */
24+ PyObject * cl_dict ; /* A dictionary */
25+ PyObject * cl_name ; /* A string */
26+ /* The following three are functions or NULL */
27+ PyObject * cl_getattr ;
28+ PyObject * cl_setattr ;
29+ PyObject * cl_delattr ;
3030} PyClassObject ;
3131
3232typedef struct {
33- PyObject_HEAD
34- PyClassObject * in_class ; /* The class object */
35- PyObject * in_dict ; /* A dictionary */
33+ PyObject_HEAD
34+ PyClassObject * in_class ; /* The class object */
35+ PyObject * in_dict ; /* A dictionary */
3636} PyInstanceObject ;
3737
3838typedef struct {
39- PyObject_HEAD
40- PyObject * im_func ; /* The callable object implementing the method */
41- PyObject * im_self ; /* The instance it is bound to, or NULL */
42- PyObject * im_class ; /* The class that defined the method */
39+ PyObject_HEAD
40+ PyObject * im_func ; /* The callable object implementing the method */
41+ PyObject * im_self ; /* The instance it is bound to, or NULL */
42+ PyObject * im_class ; /* The class that defined the method */
4343} PyMethodObject ;
4444
4545extern DL_IMPORT (PyTypeObject ) PyClass_Type , PyInstance_Type , PyMethod_Type ;
@@ -48,13 +48,14 @@ extern DL_IMPORT(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type;
4848#define PyInstance_Check (op ) ((op)->ob_type == &PyInstance_Type)
4949#define PyMethod_Check (op ) ((op)->ob_type == &PyMethod_Type)
5050
51- extern DL_IMPORT (PyObject * ) PyClass_New Py_PROTO ((PyObject * , PyObject * , PyObject * ) );
52- extern DL_IMPORT (PyObject * ) PyInstance_New Py_PROTO ((PyObject * , PyObject * , PyObject * ) );
53- extern DL_IMPORT (PyObject * ) PyMethod_New Py_PROTO ((PyObject * , PyObject * , PyObject * ) );
51+ extern DL_IMPORT (PyObject * ) PyClass_New (PyObject * , PyObject * , PyObject * );
52+ extern DL_IMPORT (PyObject * ) PyInstance_New (PyObject * , PyObject * ,
53+ PyObject * );
54+ extern DL_IMPORT (PyObject * ) PyMethod_New (PyObject * , PyObject * , PyObject * );
5455
55- extern DL_IMPORT (PyObject * ) PyMethod_Function Py_PROTO (( PyObject * ) );
56- extern DL_IMPORT (PyObject * ) PyMethod_Self Py_PROTO (( PyObject * ) );
57- extern DL_IMPORT (PyObject * ) PyMethod_Class Py_PROTO (( PyObject * ) );
56+ extern DL_IMPORT (PyObject * ) PyMethod_Function ( PyObject * );
57+ extern DL_IMPORT (PyObject * ) PyMethod_Self ( PyObject * );
58+ extern DL_IMPORT (PyObject * ) PyMethod_Class ( PyObject * );
5859
5960/* Macros for direct access to these values. Type checks are *not*
6061 done, so use with care. */
@@ -65,12 +66,12 @@ extern DL_IMPORT(PyObject *) PyMethod_Class Py_PROTO((PyObject *));
6566#define PyMethod_GET_CLASS (meth ) \
6667 (((PyMethodObject *)meth) -> im_class)
6768
68- extern DL_IMPORT (int ) PyClass_IsSubclass Py_PROTO (( PyObject * , PyObject * ) );
69+ extern DL_IMPORT (int ) PyClass_IsSubclass ( PyObject * , PyObject * );
6970
70- extern DL_IMPORT (PyObject * ) PyInstance_DoBinOp
71- Py_PROTO (( PyObject * , PyObject * ,
72- char * , char * ,
73- PyObject * ( * ) Py_PROTO (( PyObject * , PyObject * )) ) );
71+ extern DL_IMPORT (PyObject * ) PyInstance_DoBinOp ( PyObject * , PyObject * ,
72+ char * , char * ,
73+ PyObject * ( * )( PyObject * ,
74+ PyObject * ));
7475
7576#ifdef __cplusplus
7677}
0 commit comments