summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/osa
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2005-07-03 20:59:44 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2005-07-03 20:59:44 (GMT)
commit918a9e2f63a037de2a32e2b009944a0e5c693742 (patch)
tree951482c937428033e9ba8ce37bf6678503b3c163 /Mac/Modules/osa
parenta6af76cbe4e5b188ccdba0b628f9d75771c623c1 (diff)
downloadcpython-918a9e2f63a037de2a32e2b009944a0e5c693742.zip
cpython-918a9e2f63a037de2a32e2b009944a0e5c693742.tar.gz
cpython-918a9e2f63a037de2a32e2b009944a0e5c693742.tar.bz2
Updated (and regenerated) for name change in tp_init method arguments:
they are now _self, _args and _kwds.
Diffstat (limited to 'Mac/Modules/osa')
-rw-r--r--Mac/Modules/osa/_OSAmodule.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/Mac/Modules/osa/_OSAmodule.c b/Mac/Modules/osa/_OSAmodule.c
index b3a2791..fca4f9b 100644
--- a/Mac/Modules/osa/_OSAmodule.c
+++ b/Mac/Modules/osa/_OSAmodule.c
@@ -45,21 +45,22 @@ PyObject *OSAObj_New(ComponentInstance itself)
{
OSAComponentInstanceObject *it;
if (itself == NULL) {
- PyErr_SetString(OSA_Error,"NULL ComponentInstance");
- return NULL;
- }
+ PyErr_SetString(OSA_Error,"NULL ComponentInstance");
+ return NULL;
+ }
it = PyObject_NEW(OSAComponentInstanceObject, &OSAComponentInstance_Type);
if (it == NULL) return NULL;
it->ob_itself = itself;
return (PyObject *)it;
}
+
int OSAObj_Convert(PyObject *v, ComponentInstance *p_itself)
{
- if (CmpInstObj_Convert(v, p_itself))
- return 1;
- PyErr_Clear();
-
+ if (CmpInstObj_Convert(v, p_itself))
+ return 1;
+ PyErr_Clear();
+
if (!OSAObj_Check(v))
{
PyErr_SetString(PyExc_TypeError, "OSAComponentInstance required");
@@ -1133,16 +1134,16 @@ static PyMethodDef OSAObj_methods[] = {
#define OSAObj_tp_alloc PyType_GenericAlloc
-static PyObject *OSAObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+static PyObject *OSAObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
+ PyObject *_self;
ComponentInstance itself;
char *kw[] = {"itself", 0};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, OSAObj_Convert, &itself)) return NULL;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((OSAComponentInstanceObject *)self)->ob_itself = itself;
- return self;
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, OSAObj_Convert, &itself)) return NULL;
+ if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((OSAComponentInstanceObject *)_self)->ob_itself = itself;
+ return _self;
}
#define OSAObj_tp_free PyObject_Del
@@ -1210,8 +1211,8 @@ void init_OSA(void)
/*
- PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, OSAObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, OSAObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, OSAObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, OSAObj_Convert);
*/