Updated to something that works on my system, and regenerated module.

This commit is contained in:
Jack Jansen 2002-08-04 21:59:37 +00:00
parent 7ea8143fe5
commit acbaefd796
2 changed files with 7 additions and 12 deletions

View File

@ -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()

View File

@ -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);