diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-23 23:16:25 +0000 |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-23 23:16:25 +0000 |
commit | 626d67bf7f7217f8488c93e69d1dca417fb08b52 (patch) | |
tree | 915dd4a9341226cee3ef88fcfe188cf810925492 /Mac/Modules/cm | |
parent | d5c321646e11c6b1a25f9da191598ed382107bd3 (diff) | |
download | cpython-626d67bf7f7217f8488c93e69d1dca417fb08b52.tar.gz |
- Various tweaks to shut up compiler warnings.
- Regenerated with the correct calls to PyType_Ready and the correct
deallocator calls.
Diffstat (limited to 'Mac/Modules/cm')
-rw-r--r-- | Mac/Modules/cm/_Cmmodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Mac/Modules/cm/_Cmmodule.c b/Mac/Modules/cm/_Cmmodule.c index 1eaa577a8c..7abdaa966e 100644 --- a/Mac/Modules/cm/_Cmmodule.c +++ b/Mac/Modules/cm/_Cmmodule.c @@ -102,7 +102,7 @@ int CmpInstObj_Convert(PyObject *v, ComponentInstance *p_itself) static void CmpInstObj_dealloc(ComponentInstanceObject *self) { /* Cleanup of self->ob_itself goes here */ - PyObject_Del(self); + self->ob_type->tp_free((PyObject *)self); } static PyObject *CmpInstObj_CloseComponent(ComponentInstanceObject *_self, PyObject *_args) @@ -373,7 +373,7 @@ int CmpObj_Convert(PyObject *v, Component *p_itself) static void CmpObj_dealloc(ComponentObject *self) { /* Cleanup of self->ob_itself goes here */ - PyObject_Del(self); + self->ob_type->tp_free((PyObject *)self); } static PyObject *CmpObj_UnregisterComponent(ComponentObject *_self, PyObject *_args) @@ -935,12 +935,14 @@ void init_Cm(void) PyDict_SetItemString(d, "Error", Cm_Error) != 0) return; ComponentInstance_Type.ob_type = &PyType_Type; + if (PyType_Ready(&ComponentInstance_Type) < 0) return; Py_INCREF(&ComponentInstance_Type); PyModule_AddObject(m, "ComponentInstance", (PyObject *)&ComponentInstance_Type); /* Backward-compatible name */ Py_INCREF(&ComponentInstance_Type); PyModule_AddObject(m, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type); Component_Type.ob_type = &PyType_Type; + if (PyType_Ready(&Component_Type) < 0) return; Py_INCREF(&Component_Type); PyModule_AddObject(m, "Component", (PyObject *)&Component_Type); /* Backward-compatible name */ |