diff options
Diffstat (limited to 'Mac/Modules/cm/_Cmmodule.c')
-rw-r--r-- | Mac/Modules/cm/_Cmmodule.c | 60 |
1 files changed, 40 insertions, 20 deletions
diff --git a/Mac/Modules/cm/_Cmmodule.c b/Mac/Modules/cm/_Cmmodule.c index 8ea72f0..5aaa79f 100644 --- a/Mac/Modules/cm/_Cmmodule.c +++ b/Mac/Modules/cm/_Cmmodule.c @@ -305,14 +305,7 @@ static PyMethodDef CmpInstObj_methods[] = { {NULL, NULL, 0} }; -PyMethodChain CmpInstObj_chain = { CmpInstObj_methods, NULL }; - -static PyObject *CmpInstObj_getattr(ComponentInstanceObject *self, char *name) -{ - return Py_FindMethodInChain(&CmpInstObj_chain, (PyObject *)self, name); -} - -#define CmpInstObj_setattr NULL +#define CmpInstObj_getsetlist NULL #define CmpInstObj_compare NULL @@ -329,14 +322,31 @@ PyTypeObject ComponentInstance_Type = { /* methods */ (destructor) CmpInstObj_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ - (getattrfunc) CmpInstObj_getattr, /*tp_getattr*/ - (setattrfunc) CmpInstObj_setattr, /*tp_setattr*/ + (getattrfunc)0, /*tp_getattr*/ + (setattrfunc)0, /*tp_setattr*/ (cmpfunc) CmpInstObj_compare, /*tp_compare*/ (reprfunc) CmpInstObj_repr, /*tp_repr*/ (PyNumberMethods *)0, /* tp_as_number */ (PySequenceMethods *)0, /* tp_as_sequence */ (PyMappingMethods *)0, /* tp_as_mapping */ (hashfunc) CmpInstObj_hash, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + PyObject_GenericGetAttr, /*tp_getattro*/ + PyObject_GenericSetAttr, /*tp_setattro */ + 0, /*outputHook_tp_as_buffer*/ + 0, /*outputHook_tp_flags*/ + 0, /*outputHook_tp_doc*/ + 0, /*outputHook_tp_traverse*/ + 0, /*outputHook_tp_clear*/ + 0, /*outputHook_tp_richcompare*/ + 0, /*outputHook_tp_weaklistoffset*/ + 0, /*outputHook_tp_iter*/ + 0, /*outputHook_tp_iternext*/ + CmpInstObj_methods, /* tp_methods */ + 0, /*outputHook_tp_members*/ + CmpInstObj_getsetlist, /*tp_getset*/ + 0, /*outputHook_tp_base*/ }; /* --------------- End object type ComponentInstance ---------------- */ @@ -701,14 +711,7 @@ static PyMethodDef CmpObj_methods[] = { {NULL, NULL, 0} }; -PyMethodChain CmpObj_chain = { CmpObj_methods, NULL }; - -static PyObject *CmpObj_getattr(ComponentObject *self, char *name) -{ - return Py_FindMethodInChain(&CmpObj_chain, (PyObject *)self, name); -} - -#define CmpObj_setattr NULL +#define CmpObj_getsetlist NULL #define CmpObj_compare NULL @@ -725,14 +728,31 @@ PyTypeObject Component_Type = { /* methods */ (destructor) CmpObj_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ - (getattrfunc) CmpObj_getattr, /*tp_getattr*/ - (setattrfunc) CmpObj_setattr, /*tp_setattr*/ + (getattrfunc)0, /*tp_getattr*/ + (setattrfunc)0, /*tp_setattr*/ (cmpfunc) CmpObj_compare, /*tp_compare*/ (reprfunc) CmpObj_repr, /*tp_repr*/ (PyNumberMethods *)0, /* tp_as_number */ (PySequenceMethods *)0, /* tp_as_sequence */ (PyMappingMethods *)0, /* tp_as_mapping */ (hashfunc) CmpObj_hash, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + PyObject_GenericGetAttr, /*tp_getattro*/ + PyObject_GenericSetAttr, /*tp_setattro */ + 0, /*outputHook_tp_as_buffer*/ + 0, /*outputHook_tp_flags*/ + 0, /*outputHook_tp_doc*/ + 0, /*outputHook_tp_traverse*/ + 0, /*outputHook_tp_clear*/ + 0, /*outputHook_tp_richcompare*/ + 0, /*outputHook_tp_weaklistoffset*/ + 0, /*outputHook_tp_iter*/ + 0, /*outputHook_tp_iternext*/ + CmpObj_methods, /* tp_methods */ + 0, /*outputHook_tp_members*/ + CmpObj_getsetlist, /*tp_getset*/ + 0, /*outputHook_tp_base*/ }; /* ------------------- End object type Component -------------------- */ |