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/cm | |
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/cm')
-rw-r--r-- | Mac/Modules/cm/Cmmodule.c | 40 | ||||
-rw-r--r-- | Mac/Modules/cm/cmsupport.py | 4 |
2 files changed, 7 insertions, 37 deletions
diff --git a/Mac/Modules/cm/Cmmodule.c b/Mac/Modules/cm/Cmmodule.c index de00241..b8a6216 100644 --- a/Mac/Modules/cm/Cmmodule.c +++ b/Mac/Modules/cm/Cmmodule.c @@ -5,49 +5,16 @@ -#define SystemSevenOrLater 1 - #include "macglue.h" -#include <Memory.h> -#include <Dialogs.h> -#include <Menus.h> -#include <Controls.h> - -extern PyObject *ResObj_New(Handle); -extern int ResObj_Convert(PyObject *, Handle *); -extern PyObject *OptResObj_New(Handle); -extern int OptResObj_Convert(PyObject *, Handle *); - -extern PyObject *WinObj_New(WindowPtr); -extern int WinObj_Convert(PyObject *, WindowPtr *); -extern PyTypeObject Window_Type; -#define WinObj_Check(x) ((x)->ob_type == &Window_Type) - -extern PyObject *DlgObj_New(DialogPtr); -extern int DlgObj_Convert(PyObject *, DialogPtr *); -extern PyTypeObject Dialog_Type; -#define DlgObj_Check(x) ((x)->ob_type == &Dialog_Type) - -extern PyObject *MenuObj_New(MenuHandle); -extern int MenuObj_Convert(PyObject *, MenuHandle *); - -extern PyObject *CtlObj_New(ControlHandle); -extern int CtlObj_Convert(PyObject *, ControlHandle *); - -extern PyObject *GrafObj_New(GrafPtr); -extern int GrafObj_Convert(PyObject *, GrafPtr *); - -extern PyObject *BMObj_New(BitMapPtr); -extern int BMObj_Convert(PyObject *, BitMapPtr *); - -extern PyObject *WinObj_WhichWindow(WindowPtr); +#include "pymactoolbox.h" #include <Components.h> /* ** Parse/generate ComponentDescriptor records */ -PyObject *CmpDesc_New(itself) +static PyObject * +CmpDesc_New(itself) ComponentDescription *itself; { @@ -58,6 +25,7 @@ PyObject *CmpDesc_New(itself) itself->componentFlags, itself->componentFlagsMask); } +static int CmpDesc_Convert(v, p_itself) PyObject *v; ComponentDescription *p_itself; diff --git a/Mac/Modules/cm/cmsupport.py b/Mac/Modules/cm/cmsupport.py index 0a1915f..598b51d 100644 --- a/Mac/Modules/cm/cmsupport.py +++ b/Mac/Modules/cm/cmsupport.py @@ -26,7 +26,8 @@ includestuff = includestuff + """ /* ** Parse/generate ComponentDescriptor records */ -PyObject *CmpDesc_New(itself) +static PyObject * +CmpDesc_New(itself) ComponentDescription *itself; { @@ -37,6 +38,7 @@ PyObject *CmpDesc_New(itself) itself->componentFlags, itself->componentFlagsMask); } +static int CmpDesc_Convert(v, p_itself) PyObject *v; ComponentDescription *p_itself; |