]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Ifdeffed a few more sections. All functionality that is relevant on MacOSX
authorJack Jansen <jack.jansen@cwi.nl>
Sat, 19 May 2001 12:50:05 +0000 (12:50 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sat, 19 May 2001 12:50:05 +0000 (12:50 +0000)
now appears to work.

Mac/Modules/macosmodule.c

index b4c4034151de1552cfcabbaa07da119c4c00443d..c99aa4bb9d640cb0063cb02f0da73e3307d3825a 100644 (file)
@@ -400,6 +400,8 @@ MacOS_AcceptHighLevelEvent(self, args)
        return res;
 }
 #endif
+
+#if !TARGET_API_MAC_OSX
 static char schedparams_doc[] = "Set/return mainloop interrupt check flag, etc";
 
 /*
@@ -488,6 +490,7 @@ MacOS_HandleEvent(PyObject *self, PyObject *args)
        Py_INCREF(Py_None);
        return Py_None;
 }
+#endif /* !TARGET_API_MAC_OSX */
 
 static char geterr_doc[] = "Convert OSErr number to string";
 
@@ -641,6 +644,7 @@ MacOS_openrf(PyObject *self, PyObject *args)
        return (PyObject *)fp;
 }
 
+#if !TARGET_API_MAC_OSX
 static char FreeMem_doc[] = "Return the total amount of free space in the heap";
 
 static PyObject *
@@ -706,6 +710,7 @@ MacOS_OutputSeen(PyObject *self, PyObject *args)
        Py_INCREF(Py_None);
        return Py_None;
 }
+#endif /* !TARGET_API_MAC_OSX */
 
 static PyMethodDef MacOS_Methods[] = {
 #if TARGET_API_MAC_OS8
@@ -713,21 +718,25 @@ static PyMethodDef MacOS_Methods[] = {
 #endif
        {"GetCreatorAndType",           MacOS_GetCreatorAndType, 1,     getcrtp_doc},
        {"SetCreatorAndType",           MacOS_SetCreatorAndType, 1,     setcrtp_doc},
+#if !TARGET_API_MAC_OSX
        {"SchedParams",                 MacOS_SchedParams,      1,      schedparams_doc},
        {"EnableAppswitch",             MacOS_EnableAppswitch,  1,      appswitch_doc},
        {"SetEventHandler",             MacOS_SetEventHandler,  1,      setevh_doc},
        {"HandleEvent",                 MacOS_HandleEvent,      1,      handleev_doc},
+#endif
        {"GetErrorString",              MacOS_GetErrorString,   1,      geterr_doc},
        {"openrf",                      MacOS_openrf,           1,      openrf_doc},
        {"splash",                      MacOS_splash,           1,      splash_doc},
        {"DebugStr",                    MacOS_DebugStr,         1,      DebugStr_doc},
        {"GetTicks",                    MacOS_GetTicks,         1,      GetTicks_doc},
        {"SysBeep",                     MacOS_SysBeep,          1,      SysBeep_doc},
+#if !TARGET_API_MAC_OSX
        {"FreeMem",                     MacOS_FreeMem,          1,      FreeMem_doc},
        {"MaxBlock",            MacOS_MaxBlock,         1,      MaxBlock_doc},
        {"CompactMem",          MacOS_CompactMem,       1,      CompactMem_doc},
        {"KeepConsole",         MacOS_KeepConsole,      1,      KeepConsole_doc},
        {"OutputSeen",          MacOS_OutputSeen,       1,      OutputSeen_doc},
+#endif
        {NULL,                          NULL}            /* Sentinel */
 };
 
@@ -763,12 +772,12 @@ initMacOS()
        if (PyDict_SetItemString(d, "AppearanceCompliant", 
                                Py_BuildValue("i", PyMac_AppearanceCompliant)) != 0)
                return;
-#if TARGET_API_MAC_CARBON
-#define PY_RUNTIMEMODEL "carbon"
+#if TARGET_API_MAC_OSX
+#define PY_RUNTIMEMODEL "macho"
 #elif TARGET_API_MAC_OS8
 #define PY_RUNTIMEMODEL "ppc"
-#elif TARGET_API_MAC_OSX
-#define PY_RUNTIMEMODEL "macho"
+#elif TARGET_API_MAC_CARBON
+#define PY_RUNTIMEMODEL "carbon"
 #else
 #error "None of the TARGET_API_MAC_XXX I know about is set"
 #endif