diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-07-14 22:16:45 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-07-14 22:16:45 (GMT) |
commit | 9d8b96c8507644811ba92ead8f131060aafac19f (patch) | |
tree | 3e6c736185b2b38ad813f41c393d528802f3f984 /Mac/Modules/ctl/ctlsupport.py | |
parent | 41e25cc317e0db3a84f91c04a194e5f0065772a2 (diff) | |
download | cpython-9d8b96c8507644811ba92ead8f131060aafac19f.zip cpython-9d8b96c8507644811ba92ead8f131060aafac19f.tar.gz cpython-9d8b96c8507644811ba92ead8f131060aafac19f.tar.bz2 |
pymactoolbox.h contains protoypes for all externally visible toolbox module
functions. Include it in stead of duplicating the declarations everywhere. Also
cleaned up toolbox module exports, and got rid of resNotFound error.
Diffstat (limited to 'Mac/Modules/ctl/ctlsupport.py')
-rw-r--r-- | Mac/Modules/ctl/ctlsupport.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py index 30c4491..25cd520 100644 --- a/Mac/Modules/ctl/ctlsupport.py +++ b/Mac/Modules/ctl/ctlsupport.py @@ -44,6 +44,8 @@ ControlFontStyleRec_ptr = ControlFontStyleRec includestuff = includestuff + """ #include <%s>""" % MACHEADERFILE + """ +staticforward PyObject *CtlObj_WhichControl(ControlHandle); + #define as_Control(h) ((ControlHandle)h) #define as_Resource(ctl) ((Handle)ctl) #ifdef TARGET_API_MAC_CARBON @@ -51,17 +53,13 @@ includestuff = includestuff + """ #else #define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect)) #endif -#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */ - -extern PyObject *CtlObj_WhichControl(ControlHandle); /* Forward */ -extern PyObject *QdRGB_New(RGBColorPtr); -extern QdRGB_Convert(PyObject *, RGBColorPtr); /* ** Parse/generate ControlFontStyleRec records */ #if 0 /* Not needed */ -PyObject *ControlFontStyle_New(itself) +static PyObject * +ControlFontStyle_New(itself) ControlFontStyleRec *itself; { @@ -71,6 +69,7 @@ PyObject *ControlFontStyle_New(itself) } #endif +static int ControlFontStyle_Convert(v, itself) PyObject *v; ControlFontStyleRec *itself; @@ -99,7 +98,8 @@ staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr * """ finalstuff = finalstuff + """ -PyObject *CtlObj_NewUnmanaged(itself) +static PyObject * +CtlObj_NewUnmanaged(itself) ControlHandle itself; { ControlObject *it; @@ -111,7 +111,7 @@ PyObject *CtlObj_NewUnmanaged(itself) return (PyObject *)it; } -PyObject * +static PyObject * CtlObj_WhichControl(ControlHandle c) { PyObject *it; |