File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,7 +88,11 @@ PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */
8888#endif /* USE_TOOLBOX_OBJECT_GLUE */
8989
9090/* macfs exports */
91- extern int PyMac_GetFSSpec (PyObject * , FSSpec * );
91+ int PyMac_GetFSSpec (PyObject * , FSSpec * ); /* argument parser for FSSpec */
92+ PyObject * PyMac_BuildFSSpec (FSSpec * ); /* Convert FSSpec to PyObject */
93+
94+ int PyMac_GetFSRef (PyObject * , FSRef * ); /* argument parser for FSRef */
95+ PyObject * PyMac_BuildFSRef (FSRef * ); /* Convert FSRef to PyObject */
9296
9397/* AE exports */
9498extern PyObject * AEDesc_New (AppleEvent * ); /* XXXX Why passed by address?? */
Original file line number Diff line number Diff line change @@ -102,13 +102,6 @@ void PyMac_Initialize(void); /* Initialize function for embedding Python */
102102short PyMac_OpenPrefFile (void ); /* From macgetpath.c, open and return preference file */
103103#endif
104104
105- /* from macfsmodule.c: */
106- int PyMac_GetFSSpec (PyObject * , FSSpec * ); /* argument parser for FSSpec */
107- PyObject * PyMac_BuildFSSpec (FSSpec * ); /* Convert FSSpec to PyObject */
108-
109- int PyMac_GetFSRef (PyObject * , FSRef * ); /* argument parser for FSRef */
110- PyObject * PyMac_BuildFSRef (FSRef * ); /* Convert FSRef to PyObject */
111-
112105
113106/* From macfiletype.c: */
114107
Original file line number Diff line number Diff line change @@ -41,7 +41,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4141
4242#ifdef USE_TOOLBOX_OBJECT_GLUE
4343extern int _PyMac_GetFSSpec (PyObject * , FSSpec * );
44+ extern PyObject * _PyMac_BuildFSRef (FSRef * );
45+ extern int _PyMac_GetFSSpec (PyObject * , FSSpec * );
46+ extern PyObject * _PyMac_BuildFSRef (FSRef * );
4447#define PyMac_GetFSSpec _PyMac_GetFSSpec
48+ #define PyMac_BuildFSSpec _PyMac_BuildFSSpec
49+ #define PyMac_GetFSRef _PyMac_GetFSRef
50+ #define PyMac_BuildFSRef _PyMac_BuildFSRef
4551#endif
4652static PyObject * ErrorObject ;
4753
@@ -1207,6 +1213,9 @@ initmacfs(void)
12071213 PyObject * m , * d ;
12081214
12091215 PyMac_INIT_TOOLBOX_OBJECT_CONVERT (FSSpec , PyMac_GetFSSpec );
1216+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT (FSRef , PyMac_GetFSRef );
1217+ PyMac_INIT_TOOLBOX_OBJECT_NEW (FSSpec * , PyMac_BuildFSSpec );
1218+ PyMac_INIT_TOOLBOX_OBJECT_NEW (FSRef * , PyMac_BuildFSRef );
12101219
12111220 /* Create the module and add the functions */
12121221 m = Py_InitModule ("macfs" , mfs_methods );
Original file line number Diff line number Diff line change @@ -346,7 +346,11 @@ int routinename(PyObject *pyobj, object *cobj) { \
346346 } \
347347 return (*PyMacGluePtr_##routinename)(pyobj, cobj); \
348348}
349+
350+ GLUE_NEW (FSSpec * , PyMac_BuildFSSpec , "macfs" )
349351GLUE_CONVERT (FSSpec , PyMac_GetFSSpec , "macfs" )
352+ GLUE_NEW (FSRef * , PyMac_BuildFSRef , "macfs" )
353+ GLUE_CONVERT (FSRef , PyMac_GetFSRef , "macfs" )
350354
351355GLUE_NEW (AppleEvent * , AEDesc_New , "Carbon.AE" ) /* XXXX Why by address? */
352356GLUE_CONVERT (AppleEvent , AEDesc_Convert , "Carbon.AE" )
You can’t perform that action at this time.
0 commit comments