Made the core toolbox modules carbon-compatible using the new greylist feature of bgen: non-carbon methods are still included in non-carbon MacPython. The issue of backward compatibility of Python code is still open.
Macmodule and macosmodule have also been carbonified. Some functionality is still missing there.
diff --git a/Mac/Modules/macfsmodule.c b/Mac/Modules/macfsmodule.c
index 0db4022..13dde93 100644
--- a/Mac/Modules/macfsmodule.c
+++ b/Mac/Modules/macfsmodule.c
@@ -713,6 +713,7 @@
return Py_BuildValue("Oii", newmfssobject(&fss), (int)isfolder, (int)wasaliased);
}
+#ifndef TARGET_API_MAC_CARBON
static PyObject *
mfs_StandardGetFile(self, args)
PyObject *self; /* Not used */
@@ -803,6 +804,7 @@
LMSetCurDirStore(spec.parID);
return (PyObject *)newmfssobject(&ospec);
}
+#endif
static PyObject *
mfs_FSSpec(self, args)
@@ -950,11 +952,13 @@
static struct PyMethodDef mfs_methods[] = {
{"ResolveAliasFile", mfs_ResolveAliasFile, 1},
+#ifndef TARGET_API_MAC_CARBON
{"StandardGetFile", mfs_StandardGetFile, 1},
{"PromptGetFile", mfs_PromptGetFile, 1},
{"StandardPutFile", mfs_StandardPutFile, 1},
{"GetDirectory", mfs_GetDirectory, 1},
{"SetFolder", mfs_SetFolder, 1},
+#endif
{"FSSpec", mfs_FSSpec, 1},
{"RawFSSpec", mfs_RawFSSpec, 1},
{"RawAlias", mfs_RawAlias, 1},