@@ -400,6 +400,8 @@ MacOS_AcceptHighLevelEvent(self, args)
400400 return res ;
401401}
402402#endif
403+
404+ #if !TARGET_API_MAC_OSX
403405static char schedparams_doc [] = "Set/return mainloop interrupt check flag, etc" ;
404406
405407/*
@@ -488,6 +490,7 @@ MacOS_HandleEvent(PyObject *self, PyObject *args)
488490 Py_INCREF (Py_None );
489491 return Py_None ;
490492}
493+ #endif /* !TARGET_API_MAC_OSX */
491494
492495static char geterr_doc [] = "Convert OSErr number to string" ;
493496
@@ -641,6 +644,7 @@ MacOS_openrf(PyObject *self, PyObject *args)
641644 return (PyObject * )fp ;
642645}
643646
647+ #if !TARGET_API_MAC_OSX
644648static char FreeMem_doc [] = "Return the total amount of free space in the heap" ;
645649
646650static PyObject *
@@ -706,28 +710,33 @@ MacOS_OutputSeen(PyObject *self, PyObject *args)
706710 Py_INCREF (Py_None );
707711 return Py_None ;
708712}
713+ #endif /* !TARGET_API_MAC_OSX */
709714
710715static PyMethodDef MacOS_Methods [] = {
711716#if TARGET_API_MAC_OS8
712717 {"AcceptHighLevelEvent" , MacOS_AcceptHighLevelEvent , 1 , accepthle_doc },
713718#endif
714719 {"GetCreatorAndType" , MacOS_GetCreatorAndType , 1 , getcrtp_doc },
715720 {"SetCreatorAndType" , MacOS_SetCreatorAndType , 1 , setcrtp_doc },
721+ #if !TARGET_API_MAC_OSX
716722 {"SchedParams" , MacOS_SchedParams , 1 , schedparams_doc },
717723 {"EnableAppswitch" , MacOS_EnableAppswitch , 1 , appswitch_doc },
718724 {"SetEventHandler" , MacOS_SetEventHandler , 1 , setevh_doc },
719725 {"HandleEvent" , MacOS_HandleEvent , 1 , handleev_doc },
726+ #endif
720727 {"GetErrorString" , MacOS_GetErrorString , 1 , geterr_doc },
721728 {"openrf" , MacOS_openrf , 1 , openrf_doc },
722729 {"splash" , MacOS_splash , 1 , splash_doc },
723730 {"DebugStr" , MacOS_DebugStr , 1 , DebugStr_doc },
724731 {"GetTicks" , MacOS_GetTicks , 1 , GetTicks_doc },
725732 {"SysBeep" , MacOS_SysBeep , 1 , SysBeep_doc },
733+ #if !TARGET_API_MAC_OSX
726734 {"FreeMem" , MacOS_FreeMem , 1 , FreeMem_doc },
727735 {"MaxBlock" , MacOS_MaxBlock , 1 , MaxBlock_doc },
728736 {"CompactMem" , MacOS_CompactMem , 1 , CompactMem_doc },
729737 {"KeepConsole" , MacOS_KeepConsole , 1 , KeepConsole_doc },
730738 {"OutputSeen" , MacOS_OutputSeen , 1 , OutputSeen_doc },
739+ #endif
731740 {NULL , NULL } /* Sentinel */
732741};
733742
@@ -763,12 +772,12 @@ initMacOS()
763772 if (PyDict_SetItemString (d , "AppearanceCompliant" ,
764773 Py_BuildValue ("i" , PyMac_AppearanceCompliant )) != 0 )
765774 return ;
766- #if TARGET_API_MAC_CARBON
767- #define PY_RUNTIMEMODEL "carbon "
775+ #if TARGET_API_MAC_OSX
776+ #define PY_RUNTIMEMODEL "macho "
768777#elif TARGET_API_MAC_OS8
769778#define PY_RUNTIMEMODEL "ppc"
770- #elif TARGET_API_MAC_OSX
771- #define PY_RUNTIMEMODEL "macho "
779+ #elif TARGET_API_MAC_CARBON
780+ #define PY_RUNTIMEMODEL "carbon "
772781#else
773782#error "None of the TARGET_API_MAC_XXX I know about is set"
774783#endif
0 commit comments