Mercurial > cpython-lru_cache-weakref
diff Mac/Modules/macosmodule.c @ 17813:8cd8741ebec0 legacy-trunk
Be more sensible about when to use TARGET_API_MAC_OS8 in stead of !TARGET_API_MAC_CARBON. This should greatly facilitate porting stuff to OSX in its MachO/BSD incarnation.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Sat, 12 May 2001 21:31:34 +0000 |
| parents | a130d5f7e58a |
| children | be969e717b91 |
line wrap: on
line diff
--- a/Mac/Modules/macosmodule.c Sat May 12 21:09:45 2001 +0000 +++ b/Mac/Modules/macosmodule.c Sat May 12 21:31:34 2001 +0000 @@ -360,7 +360,7 @@ #include <EPPC.h> #include <Events.h> -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 static char accepthle_doc[] = "Get arguments of pending high-level event"; static PyObject * @@ -704,7 +704,7 @@ } static PyMethodDef MacOS_Methods[] = { -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 {"AcceptHighLevelEvent", MacOS_AcceptHighLevelEvent, 1, accepthle_doc}, #endif {"GetCreatorAndType", MacOS_GetCreatorAndType, 1, getcrtp_doc}, @@ -760,10 +760,13 @@ Py_BuildValue("i", PyMac_AppearanceCompliant)) != 0) return; #if TARGET_API_MAC_CARBON -/* Will need a different name for MachO-carbon later (macho?) */ #define PY_RUNTIMEMODEL "carbon" +#elif TARGET_API_MAC_OS8 +#define PY_RUNTIMEMODEL "ppc" +#elif TARGET_API_MAC_OSX +#define PY_RUNTIMEMODEL "macho" #else -#define PY_RUNTIMEMODEL "ppc" +#error "None of the TARGET_API_MAC_XXX I know about is set" #endif if (PyDict_SetItemString(d, "runtimemodel", Py_BuildValue("s", PY_RUNTIMEMODEL)) != 0)
