[Python-checkins] CVS: python/dist/src/Mac/Modules/res ressupport.py,1.14,1.15
Jack Jansen
jackjansen@users.sourceforge.net
Tue, 22 May 2001 14:55:16 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/res
In directory usw-pr-cvs1:/tmp/cvs-serv14972/Python/Mac/Modules/res
Modified Files:
ressupport.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: ressupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/res/ressupport.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** ressupport.py 2001/05/17 21:58:02 1.14
--- ressupport.py 2001/05/22 21:55:14 1.15
***************
*** 24,29 ****
--- 24,33 ----
includestuff = includestuff + """
+ #ifdef WITHOUT_FRAMEWORKS
#include <Resources.h>
#include <string.h>
+ #else
+ #include <Carbon/Carbon.h>
+ #endif
#ifdef USE_TOOLBOX_OBJECT_GLUE
***************
*** 49,54 ****
/* Alternative version of ResObj_New, which returns None for null argument */
! PyObject *OptResObj_New(itself)
! Handle itself;
{
if (itself == NULL) {
--- 53,57 ----
/* Alternative version of ResObj_New, which returns None for null argument */
! PyObject *OptResObj_New(Handle itself)
{
if (itself == NULL) {
***************
*** 59,65 ****
}
! OptResObj_Convert(v, p_itself)
! PyObject *v;
! Handle *p_itself;
{
PyObject *tmp;
--- 62,66 ----
}
! OptResObj_Convert(PyObject *v, Handle *p_itself)
{
PyObject *tmp;
***************
*** 87,94 ****
initstuff = initstuff + """
! PyMac_INIT_TOOLBOX_OBJECT_NEW(ResObj_New);
! PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ResObj_Convert);
! PyMac_INIT_TOOLBOX_OBJECT_NEW(OptResObj_New);
! PyMac_INIT_TOOLBOX_OBJECT_CONVERT(OptResObj_Convert);
"""
--- 88,95 ----
initstuff = initstuff + """
! PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, ResObj_New);
! PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, ResObj_Convert);
! PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, OptResObj_New);
! PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, OptResObj_Convert);
"""
***************
*** 116,123 ****
setattrCode = """
static int
! ResObj_setattr(self, name, value)
! ResourceObject *self;
! char *name;
! PyObject *value;
{
char *data;
--- 117,121 ----
setattrCode = """
static int
! ResObj_setattr(ResourceObject *self, char *name, PyObject *value)
{
char *data;