diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1997-02-24 13:56:59 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1997-02-24 13:56:59 (GMT) |
commit | 4a8c54e6d91549ae140970862d661dacf1112e31 (patch) | |
tree | 23703ecb8562e7301dd487ecb310bf4ad74cf802 /Mac/Modules/cm/Cmmodule.c | |
parent | 6a528149dbed46723b8fc48c7b7cd21f9a727dff (diff) | |
download | cpython-4a8c54e6d91549ae140970862d661dacf1112e31.zip cpython-4a8c54e6d91549ae140970862d661dacf1112e31.tar.gz cpython-4a8c54e6d91549ae140970862d661dacf1112e31.tar.bz2 |
- Changed GestaltEqu.h to Gestalt.h
- Changed FragLoader.h to CodeFragments.h
- Removed Desk.h
- Regenerated bgen modules from new universal headers
- Changed some of the s# in PyArg_ParseTuple to m# (unfortunately:
this should have been a different commit)
Diffstat (limited to 'Mac/Modules/cm/Cmmodule.c')
-rw-r--r-- | Mac/Modules/cm/Cmmodule.c | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/Mac/Modules/cm/Cmmodule.c b/Mac/Modules/cm/Cmmodule.c index fd8b331..93aab45 100644 --- a/Mac/Modules/cm/Cmmodule.c +++ b/Mac/Modules/cm/Cmmodule.c @@ -146,54 +146,6 @@ static PyObject *CmpInstObj_GetComponentInstanceError(_self, _args) return _res; } -static PyObject *CmpInstObj_ComponentFunctionImplemented(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; -{ - PyObject *_res = NULL; - long _rv; - short ftnNumber; - if (!PyArg_ParseTuple(_args, "h", - &ftnNumber)) - return NULL; - _rv = ComponentFunctionImplemented(_self->ob_itself, - ftnNumber); - _res = Py_BuildValue("l", - _rv); - return _res; -} - -static PyObject *CmpInstObj_GetComponentVersion(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; -{ - PyObject *_res = NULL; - long _rv; - if (!PyArg_ParseTuple(_args, "")) - return NULL; - _rv = GetComponentVersion(_self->ob_itself); - _res = Py_BuildValue("l", - _rv); - return _res; -} - -static PyObject *CmpInstObj_ComponentSetTarget(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; -{ - PyObject *_res = NULL; - long _rv; - ComponentInstance target; - if (!PyArg_ParseTuple(_args, "O&", - CmpInstObj_Convert, &target)) - return NULL; - _rv = ComponentSetTarget(_self->ob_itself, - target); - _res = Py_BuildValue("l", - _rv); - return _res; -} - static PyObject *CmpInstObj_SetComponentInstanceError(_self, _args) ComponentInstanceObject *_self; PyObject *_args; @@ -270,17 +222,59 @@ static PyObject *CmpInstObj_SetComponentInstanceA5(_self, _args) return _res; } +static PyObject *CmpInstObj_ComponentFunctionImplemented(_self, _args) + ComponentInstanceObject *_self; + PyObject *_args; +{ + PyObject *_res = NULL; + long _rv; + short ftnNumber; + if (!PyArg_ParseTuple(_args, "h", + &ftnNumber)) + return NULL; + _rv = ComponentFunctionImplemented(_self->ob_itself, + ftnNumber); + _res = Py_BuildValue("l", + _rv); + return _res; +} + +static PyObject *CmpInstObj_GetComponentVersion(_self, _args) + ComponentInstanceObject *_self; + PyObject *_args; +{ + PyObject *_res = NULL; + long _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = GetComponentVersion(_self->ob_itself); + _res = Py_BuildValue("l", + _rv); + return _res; +} + +static PyObject *CmpInstObj_ComponentSetTarget(_self, _args) + ComponentInstanceObject *_self; + PyObject *_args; +{ + PyObject *_res = NULL; + long _rv; + ComponentInstance target; + if (!PyArg_ParseTuple(_args, "O&", + CmpInstObj_Convert, &target)) + return NULL; + _rv = ComponentSetTarget(_self->ob_itself, + target); + _res = Py_BuildValue("l", + _rv); + return _res; +} + static PyMethodDef CmpInstObj_methods[] = { {"CloseComponent", (PyCFunction)CmpInstObj_CloseComponent, 1, "() -> None"}, {"GetComponentInstanceError", (PyCFunction)CmpInstObj_GetComponentInstanceError, 1, "() -> None"}, - {"ComponentFunctionImplemented", (PyCFunction)CmpInstObj_ComponentFunctionImplemented, 1, - "(short ftnNumber) -> (long _rv)"}, - {"GetComponentVersion", (PyCFunction)CmpInstObj_GetComponentVersion, 1, - "() -> (long _rv)"}, - {"ComponentSetTarget", (PyCFunction)CmpInstObj_ComponentSetTarget, 1, - "(ComponentInstance target) -> (long _rv)"}, {"SetComponentInstanceError", (PyCFunction)CmpInstObj_SetComponentInstanceError, 1, "(OSErr theError) -> None"}, {"GetComponentInstanceStorage", (PyCFunction)CmpInstObj_GetComponentInstanceStorage, 1, @@ -291,6 +285,12 @@ static PyMethodDef CmpInstObj_methods[] = { "() -> (long _rv)"}, {"SetComponentInstanceA5", (PyCFunction)CmpInstObj_SetComponentInstanceA5, 1, "(long theA5) -> None"}, + {"ComponentFunctionImplemented", (PyCFunction)CmpInstObj_ComponentFunctionImplemented, 1, + "(short ftnNumber) -> (long _rv)"}, + {"GetComponentVersion", (PyCFunction)CmpInstObj_GetComponentVersion, 1, + "() -> (long _rv)"}, + {"ComponentSetTarget", (PyCFunction)CmpInstObj_ComponentSetTarget, 1, + "(ComponentInstance target) -> (long _rv)"}, {NULL, NULL, 0} }; @@ -609,13 +609,13 @@ static PyObject *Cm_RegisterComponentResource(_self, _args) { PyObject *_res = NULL; Component _rv; - ComponentResourceHandle tr; + ComponentResourceHandle cr; short global; if (!PyArg_ParseTuple(_args, "O&h", - ResObj_Convert, &tr, + ResObj_Convert, &cr, &global)) return NULL; - _rv = RegisterComponentResource(tr, + _rv = RegisterComponentResource(cr, global); _res = Py_BuildValue("O&", CmpObj_New, _rv); @@ -728,7 +728,7 @@ static PyObject *Cm_RegisterComponentResourceFile(_self, _args) static PyMethodDef Cm_methods[] = { {"RegisterComponentResource", (PyCFunction)Cm_RegisterComponentResource, 1, - "(ComponentResourceHandle tr, short global) -> (Component _rv)"}, + "(ComponentResourceHandle cr, short global) -> (Component _rv)"}, {"FindNextComponent", (PyCFunction)Cm_FindNextComponent, 1, "(Component aComponent, ComponentDescription looking) -> (Component _rv)"}, {"CountComponents", (PyCFunction)Cm_CountComponents, 1, |