diff options
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Modules/ibcarbon/IBCarbonscan.py | 7 | ||||
-rw-r--r-- | Mac/Modules/ibcarbon/_IBCarbon.c | 12 |
2 files changed, 7 insertions, 12 deletions
diff --git a/Mac/Modules/ibcarbon/IBCarbonscan.py b/Mac/Modules/ibcarbon/IBCarbonscan.py index 7c54fc9..9312629 100644 --- a/Mac/Modules/ibcarbon/IBCarbonscan.py +++ b/Mac/Modules/ibcarbon/IBCarbonscan.py @@ -5,7 +5,7 @@ import os import string import MacOS -BGENDIR= '/Users/dp/python/dist/src/Tools/bgen/bgen' +BGENDIR= '/Users/jack/src/python/Tools/bgen/bgen' sys.path.append(BGENDIR) print sys.path, sys.prefix from bgenlocations import TOOLBOXDIR @@ -25,6 +25,7 @@ def main(): print "done" class IBCarbon_Scanner(Scanner_OSX): + def destination(self, type, name, arglist): classname = "IBCarbonFunction" listname = "functions" @@ -40,6 +41,10 @@ class IBCarbon_Scanner(Scanner_OSX): "DisposeNibReference", # taken care of by destructor "CreateNibReferenceWithCFBundle", ## need to wrap CFBundle.h properly first ] + + def makerepairinstructions(self): + return [] + if __name__ == "__main__": main() diff --git a/Mac/Modules/ibcarbon/_IBCarbon.c b/Mac/Modules/ibcarbon/_IBCarbon.c index 34e432f..e4cd041 100644 --- a/Mac/Modules/ibcarbon/_IBCarbon.c +++ b/Mac/Modules/ibcarbon/_IBCarbon.c @@ -55,7 +55,7 @@ int IBNibRefObj_Convert(PyObject *v, IBNibRef *p_itself) static void IBNibRefObj_dealloc(IBNibRefObject *self) { DisposeNibReference(self->ob_itself); - PyMem_DEL(self); + PyObject_Del(self); } static PyObject *IBNibRefObj_CreateWindowFromNib(IBNibRefObject *_self, PyObject *_args) @@ -67,11 +67,9 @@ static PyObject *IBNibRefObj_CreateWindowFromNib(IBNibRefObject *_self, PyObject if (!PyArg_ParseTuple(_args, "O&", CFStringRefObj_Convert, &inName)) return NULL; - Py_BEGIN_ALLOW_THREADS _err = CreateWindowFromNib(_self->ob_itself, inName, &outWindow); - Py_END_ALLOW_THREADS if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", WinObj_New, outWindow); @@ -87,11 +85,9 @@ static PyObject *IBNibRefObj_CreateMenuFromNib(IBNibRefObject *_self, PyObject * if (!PyArg_ParseTuple(_args, "O&", CFStringRefObj_Convert, &inName)) return NULL; - Py_BEGIN_ALLOW_THREADS _err = CreateMenuFromNib(_self->ob_itself, inName, &outMenuRef); - Py_END_ALLOW_THREADS if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", MenuObj_New, outMenuRef); @@ -107,11 +103,9 @@ static PyObject *IBNibRefObj_CreateMenuBarFromNib(IBNibRefObject *_self, PyObjec if (!PyArg_ParseTuple(_args, "O&", CFStringRefObj_Convert, &inName)) return NULL; - Py_BEGIN_ALLOW_THREADS _err = CreateMenuBarFromNib(_self->ob_itself, inName, &outMenuBar); - Py_END_ALLOW_THREADS if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ResObj_New, outMenuBar); @@ -126,10 +120,8 @@ static PyObject *IBNibRefObj_SetMenuBarFromNib(IBNibRefObject *_self, PyObject * if (!PyArg_ParseTuple(_args, "O&", CFStringRefObj_Convert, &inName)) return NULL; - Py_BEGIN_ALLOW_THREADS _err = SetMenuBarFromNib(_self->ob_itself, inName); - Py_END_ALLOW_THREADS if (_err != noErr) return PyMac_Error(_err); Py_INCREF(Py_None); _res = Py_None; @@ -194,10 +186,8 @@ static PyObject *IBCarbon_CreateNibReference(PyObject *_self, PyObject *_args) if (!PyArg_ParseTuple(_args, "O&", CFStringRefObj_Convert, &inNibName)) return NULL; - Py_BEGIN_ALLOW_THREADS _err = CreateNibReference(inNibName, &outNibRef); - Py_END_ALLOW_THREADS if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", IBNibRefObj_New, outNibRef); |