mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core
(Contributed by Bob Ippolito.) This patch trims down the Python core on Darwin by making it independent of CoreFoundation and CoreServices. It does this by: Changed linker flags in configure/configure.in Removed the unused PyMac_GetAppletScriptFile Moved the implementation of PyMac_StrError to the MacOS module Moved the implementation of PyMac_GetFullPathname to the Carbon.File module
This commit is contained in:
parent
e0bdaefaf4
commit
ec6eb369d5
5 changed files with 189 additions and 188 deletions
|
@ -13,15 +13,13 @@
|
|||
/*
|
||||
** Helper routines for error codes and such.
|
||||
*/
|
||||
char *PyMac_StrError(int); /* strerror with mac errors */
|
||||
char *PyMac_StrError(int); /* strerror with mac errors */
|
||||
extern PyObject *PyMac_OSErrException; /* Exception for OSErr */
|
||||
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
|
||||
PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
|
||||
PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
|
||||
extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert fsspec->path */
|
||||
#ifdef WITH_NEXT_FRAMEWORK
|
||||
extern char *PyMac_GetAppletScriptFile(void); /* Return applet script file or NULL */
|
||||
#endif
|
||||
PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
|
||||
extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert
|
||||
fsspec->path */
|
||||
/*
|
||||
** These conversion routines are defined in mactoolboxglue.c itself.
|
||||
*/
|
||||
|
@ -32,21 +30,24 @@ PyObject *PyMac_BuildNumVersion(NumVersion);/* Convert NumVersion to PyObject */
|
|||
|
||||
int PyMac_GetStr255(PyObject *, Str255); /* argument parser for Str255 */
|
||||
PyObject *PyMac_BuildStr255(Str255); /* Convert Str255 to PyObject */
|
||||
PyObject *PyMac_BuildOptStr255(Str255); /* Convert Str255 to PyObject, NULL to None */
|
||||
PyObject *PyMac_BuildOptStr255(Str255); /* Convert Str255 to PyObject,
|
||||
NULL to None */
|
||||
|
||||
int PyMac_GetRect(PyObject *, Rect *); /* argument parser for Rect */
|
||||
PyObject *PyMac_BuildRect(Rect *); /* Convert Rect to PyObject */
|
||||
PyObject *PyMac_BuildRect(Rect *); /* Convert Rect to PyObject */
|
||||
|
||||
int PyMac_GetPoint(PyObject *, Point *); /* argument parser for Point */
|
||||
PyObject *PyMac_BuildPoint(Point); /* Convert Point to PyObject */
|
||||
PyObject *PyMac_BuildPoint(Point); /* Convert Point to PyObject */
|
||||
|
||||
int PyMac_GetEventRecord(PyObject *, EventRecord *); /* argument parser for EventRecord */
|
||||
PyObject *PyMac_BuildEventRecord(EventRecord *); /* Convert EventRecord to PyObject */
|
||||
int PyMac_GetEventRecord(PyObject *, EventRecord *); /* argument parser for
|
||||
EventRecord */
|
||||
PyObject *PyMac_BuildEventRecord(EventRecord *); /* Convert EventRecord to
|
||||
PyObject */
|
||||
|
||||
int PyMac_GetFixed(PyObject *, Fixed *); /* argument parser for Fixed */
|
||||
PyObject *PyMac_BuildFixed(Fixed); /* Convert Fixed to PyObject */
|
||||
PyObject *PyMac_BuildFixed(Fixed); /* Convert Fixed to PyObject */
|
||||
int PyMac_Getwide(PyObject *, wide *); /* argument parser for wide */
|
||||
PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */
|
||||
PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */
|
||||
|
||||
/*
|
||||
** The rest of the routines are implemented by extension modules. If they are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue