@@ -1436,6 +1436,8 @@ static PyObject *Res_FSResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
14361436 return _res ;
14371437}
14381438
1439+ #if TARGET_API_MAC_CARBON
1440+
14391441static PyObject * Res_FSCreateResourceFile (PyObject * _self , PyObject * _args )
14401442{
14411443 PyObject * _res = NULL ;
@@ -1473,6 +1475,9 @@ static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
14731475 PyMac_BuildFSSpec , newSpec );
14741476 return _res ;
14751477}
1478+ #endif
1479+
1480+ #if TARGET_API_MAC_CARBON
14761481
14771482static PyObject * Res_FSOpenResourceFile (PyObject * _self , PyObject * _args )
14781483{
@@ -1503,6 +1508,7 @@ static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
15031508 refNum );
15041509 return _res ;
15051510}
1511+ #endif
15061512
15071513static PyObject * Res_Resource (PyObject * _self , PyObject * _args )
15081514{
@@ -1671,10 +1677,16 @@ static PyMethodDef Res_methods[] = {
16711677 "(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)" },
16721678 {"FSResourceFileAlreadyOpen" , (PyCFunction )Res_FSResourceFileAlreadyOpen , 1 ,
16731679 "(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)" },
1680+
1681+ #if TARGET_API_MAC_CARBON
16741682 {"FSCreateResourceFile" , (PyCFunction )Res_FSCreateResourceFile , 1 ,
16751683 "(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (OSErr _rv, FSRef newRef, FSSpec newSpec)" },
1684+ #endif
1685+
1686+ #if TARGET_API_MAC_CARBON
16761687 {"FSOpenResourceFile" , (PyCFunction )Res_FSOpenResourceFile , 1 ,
16771688 "(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (OSErr _rv, SInt16 refNum)" },
1689+ #endif
16781690 {"Resource" , (PyCFunction )Res_Resource , 1 ,
16791691 "Convert a string to a resource object.\n\nThe created resource object is actually just a handle,\napply AddResource() to write it to a resource file.\nSee also the Handle() docstring.\n" },
16801692 {"Handle" , (PyCFunction )Res_Handle , 1 ,
0 commit comments