[Python-checkins] CVS: python/dist/src/Mac/Modules/dlg dlgsupport.py,1.23,1.24
Jack Jansen
jackjansen@users.sourceforge.net
Tue, 22 May 2001 14:52:00 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/dlg
In directory usw-pr-cvs1:/tmp/cvs-serv13961/Python/Mac/Modules/dlg
Modified Files:
dlgsupport.py
Log Message:
Lots more Carbon/Carbon.h includes, new UPP routine names, function prototypes. Most toolbox modules now compile, link and import in MacOSX-MachO python.
Index: dlgsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/dlg/dlgsupport.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** dlgsupport.py 2001/05/17 21:55:08 1.23
--- dlgsupport.py 2001/05/22 21:51:58 1.24
***************
*** 32,36 ****
--- 32,41 ----
includestuff = includestuff + """
+ #ifdef WITHOUT_FRAMEWORKS
#include <Dialogs.h>
+ #else
+ #include <Carbon/Carbon.h>
+ #endif
+
#ifdef USE_TOOLBOX_OBJECT_GLUE
extern PyObject *_DlgObj_New(DialogRef);
***************
*** 151,156 ****
#if 0
WindowPtr
! DlgObj_ConvertToWindow(self)
! PyObject *self;
{
if ( DlgObj_Check(self) )
--- 156,160 ----
#if 0
WindowPtr
! DlgObj_ConvertToWindow(PyObject *self)
{
if ( DlgObj_Check(self) )
***************
*** 162,167 ****
PyObject *
! DlgObj_WhichDialog(d)
! DialogPtr d;
{
PyObject *it;
--- 166,170 ----
PyObject *
! DlgObj_WhichDialog(DialogPtr d)
{
PyObject *it;
***************
*** 192,198 ****
initstuff = initstuff + """
! PyMac_INIT_TOOLBOX_OBJECT_NEW(DlgObj_New);
! PyMac_INIT_TOOLBOX_OBJECT_NEW(DlgObj_WhichDialog);
! PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DlgObj_Convert);
"""
--- 195,201 ----
initstuff = initstuff + """
! PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_New);
! PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_WhichDialog);
! PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DialogPtr, DlgObj_Convert);
"""
***************
*** 220,227 ****
def outputCompare(self):
Output()
! Output("static int %s_compare(self, other)", self.prefix)
! IndentLevel()
! Output("%s *self, *other;", self.objecttype)
! DedentLevel()
OutLbrace()
Output("if ( self->ob_itself > other->ob_itself ) return 1;")
--- 223,227 ----
def outputCompare(self):
Output()
! Output("static int %s_compare(%s *self, %s *other)", self.prefix, self.objecttype, self.objecttype)
OutLbrace()
Output("if ( self->ob_itself > other->ob_itself ) return 1;")
***************
*** 232,239 ****
def outputHash(self):
Output()
! Output("static int %s_hash(self)", self.prefix)
! IndentLevel()
! Output("%s *self;", self.objecttype)
! DedentLevel()
OutLbrace()
Output("return (int)self->ob_itself;")
--- 232,236 ----
def outputHash(self):
Output()
! Output("static int %s_hash(%s *self)", self.prefix, self.objecttype)
OutLbrace()
Output("return (int)self->ob_itself;")
***************
*** 294,298 ****
} else {
Py_INCREF(new);
! _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemProc(Dlg_UnivUserItemProc));
}
--- 291,295 ----
} else {
Py_INCREF(new);
! _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemUPP(Dlg_UnivUserItemProc));
}