[Python-checkins] CVS: python/dist/src/Mac/Include macglue.h,1.53,1.54
Jack Jansen
jackjansen@users.sourceforge.net
Sat, 12 May 2001 15:46:37 -0700
Update of /cvsroot/python/python/dist/src/Mac/Include
In directory usw-pr-cvs1:/tmp/cvs-serv24671/Include
Modified Files:
macglue.h
Log Message:
Got the first MacPython module working under MacOSX/MachO (gestalt). Main changes
are including Carbon/Carbon.h in stead of the old headers (unless WITHOUT_FRAMEWORKS
is defined, as it will be for classic MacPython) and selectively disabling all the
stuff that is unneeded in a unix-Python (event handling, etc).
Index: macglue.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Include/macglue.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -r1.53 -r1.54
*** macglue.h 2001/05/12 21:30:02 1.53
--- macglue.h 2001/05/12 22:46:35 1.54
***************
*** 23,30 ****
--- 23,34 ----
******************************************************************/
+ #ifdef WITHOUT_FRAMEWORKS
#include <Types.h>
#include <Files.h>
#include <Events.h>
#include <StandardFile.h>
+ #else
+ #include <Carbon/Carbon.h>
+ #endif
#ifdef __cplusplus
***************
*** 48,51 ****
--- 52,57 ----
char *PyMac_StrError(int); /* strerror with mac errors */
+ PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
+ PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
unsigned char *Pstring(char *str); /* Convert c-string to pascal-string in static buffer */
***************
*** 66,82 ****
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
void PyMac_GetSchedParams(PyMacSchedParams *); /* Get schedulers params */
void PyMac_SetSchedParams(PyMacSchedParams *); /* Set schedulers params */
- PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
- PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
int PyMac_DoYield(int, int); /* Yield cpu. First arg is maxtime, second ok to call python */
int PyMac_HandleEvent(EventRecord *); /* Handle one event, possibly in Python */
void PyMac_HandleEventIntern(EventRecord *); /* Handle one event internal only */
int PyMac_SetEventHandler(PyObject *); /* set python-coded event handler */
void PyMac_InitMenuBar(void); /* Setup menu bar as we want it */
void PyMac_RestoreMenuBar(void); /* Restore menu bar for ease of exiting */
void PyMac_RaiseConsoleWindow(); /* Bring console window to front, if it exists */
!
int PyMac_FindResourceModule(PyStringObject *, char *, char *); /* Test for 'PYC ' resource in a file */
PyObject * PyMac_LoadResourceModule(char *, char *); /* Load 'PYC ' resource from file */
--- 72,89 ----
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
+ #if !TARGET_API_MAC_OSX
void PyMac_GetSchedParams(PyMacSchedParams *); /* Get schedulers params */
void PyMac_SetSchedParams(PyMacSchedParams *); /* Set schedulers params */
int PyMac_DoYield(int, int); /* Yield cpu. First arg is maxtime, second ok to call python */
+ #endif
int PyMac_HandleEvent(EventRecord *); /* Handle one event, possibly in Python */
void PyMac_HandleEventIntern(EventRecord *); /* Handle one event internal only */
int PyMac_SetEventHandler(PyObject *); /* set python-coded event handler */
+ #if !TARGET_API_MAC_OSX
void PyMac_InitMenuBar(void); /* Setup menu bar as we want it */
void PyMac_RestoreMenuBar(void); /* Restore menu bar for ease of exiting */
void PyMac_RaiseConsoleWindow(); /* Bring console window to front, if it exists */
! #endif
int PyMac_FindResourceModule(PyStringObject *, char *, char *); /* Test for 'PYC ' resource in a file */
PyObject * PyMac_LoadResourceModule(char *, char *); /* Load 'PYC ' resource from file */