mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Updated to something that works on my system, and regenerated module.
This commit is contained in:
parent
7ea8143fe5
commit
acbaefd796
2 changed files with 7 additions and 12 deletions
|
@ -5,7 +5,7 @@ import os
|
||||||
import string
|
import string
|
||||||
import MacOS
|
import MacOS
|
||||||
|
|
||||||
BGENDIR= '/Users/dp/python/dist/src/Tools/bgen/bgen'
|
BGENDIR= '/Users/jack/src/python/Tools/bgen/bgen'
|
||||||
sys.path.append(BGENDIR)
|
sys.path.append(BGENDIR)
|
||||||
print sys.path, sys.prefix
|
print sys.path, sys.prefix
|
||||||
from bgenlocations import TOOLBOXDIR
|
from bgenlocations import TOOLBOXDIR
|
||||||
|
@ -25,6 +25,7 @@ def main():
|
||||||
print "done"
|
print "done"
|
||||||
|
|
||||||
class IBCarbon_Scanner(Scanner_OSX):
|
class IBCarbon_Scanner(Scanner_OSX):
|
||||||
|
|
||||||
def destination(self, type, name, arglist):
|
def destination(self, type, name, arglist):
|
||||||
classname = "IBCarbonFunction"
|
classname = "IBCarbonFunction"
|
||||||
listname = "functions"
|
listname = "functions"
|
||||||
|
@ -40,6 +41,10 @@ class IBCarbon_Scanner(Scanner_OSX):
|
||||||
"DisposeNibReference", # taken care of by destructor
|
"DisposeNibReference", # taken care of by destructor
|
||||||
"CreateNibReferenceWithCFBundle", ## need to wrap CFBundle.h properly first
|
"CreateNibReferenceWithCFBundle", ## need to wrap CFBundle.h properly first
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def makerepairinstructions(self):
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -55,7 +55,7 @@ int IBNibRefObj_Convert(PyObject *v, IBNibRef *p_itself)
|
||||||
static void IBNibRefObj_dealloc(IBNibRefObject *self)
|
static void IBNibRefObj_dealloc(IBNibRefObject *self)
|
||||||
{
|
{
|
||||||
DisposeNibReference(self->ob_itself);
|
DisposeNibReference(self->ob_itself);
|
||||||
PyMem_DEL(self);
|
PyObject_Del(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *IBNibRefObj_CreateWindowFromNib(IBNibRefObject *_self, PyObject *_args)
|
static PyObject *IBNibRefObj_CreateWindowFromNib(IBNibRefObject *_self, PyObject *_args)
|
||||||
|
@ -67,11 +67,9 @@ static PyObject *IBNibRefObj_CreateWindowFromNib(IBNibRefObject *_self, PyObject
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
CFStringRefObj_Convert, &inName))
|
CFStringRefObj_Convert, &inName))
|
||||||
return NULL;
|
return NULL;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
_err = CreateWindowFromNib(_self->ob_itself,
|
_err = CreateWindowFromNib(_self->ob_itself,
|
||||||
inName,
|
inName,
|
||||||
&outWindow);
|
&outWindow);
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
WinObj_New, outWindow);
|
WinObj_New, outWindow);
|
||||||
|
@ -87,11 +85,9 @@ static PyObject *IBNibRefObj_CreateMenuFromNib(IBNibRefObject *_self, PyObject *
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
CFStringRefObj_Convert, &inName))
|
CFStringRefObj_Convert, &inName))
|
||||||
return NULL;
|
return NULL;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
_err = CreateMenuFromNib(_self->ob_itself,
|
_err = CreateMenuFromNib(_self->ob_itself,
|
||||||
inName,
|
inName,
|
||||||
&outMenuRef);
|
&outMenuRef);
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
MenuObj_New, outMenuRef);
|
MenuObj_New, outMenuRef);
|
||||||
|
@ -107,11 +103,9 @@ static PyObject *IBNibRefObj_CreateMenuBarFromNib(IBNibRefObject *_self, PyObjec
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
CFStringRefObj_Convert, &inName))
|
CFStringRefObj_Convert, &inName))
|
||||||
return NULL;
|
return NULL;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
_err = CreateMenuBarFromNib(_self->ob_itself,
|
_err = CreateMenuBarFromNib(_self->ob_itself,
|
||||||
inName,
|
inName,
|
||||||
&outMenuBar);
|
&outMenuBar);
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
ResObj_New, outMenuBar);
|
ResObj_New, outMenuBar);
|
||||||
|
@ -126,10 +120,8 @@ static PyObject *IBNibRefObj_SetMenuBarFromNib(IBNibRefObject *_self, PyObject *
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
CFStringRefObj_Convert, &inName))
|
CFStringRefObj_Convert, &inName))
|
||||||
return NULL;
|
return NULL;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
_err = SetMenuBarFromNib(_self->ob_itself,
|
_err = SetMenuBarFromNib(_self->ob_itself,
|
||||||
inName);
|
inName);
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -194,10 +186,8 @@ static PyObject *IBCarbon_CreateNibReference(PyObject *_self, PyObject *_args)
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
CFStringRefObj_Convert, &inNibName))
|
CFStringRefObj_Convert, &inNibName))
|
||||||
return NULL;
|
return NULL;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
_err = CreateNibReference(inNibName,
|
_err = CreateNibReference(inNibName,
|
||||||
&outNibRef);
|
&outNibRef);
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
IBNibRefObj_New, outNibRef);
|
IBNibRefObj_New, outNibRef);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue