summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/Nav.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-06-02 21:35:07 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-06-02 21:35:07 (GMT)
commite79dc76f53dfa18fb08c35f71b049259642c0142 (patch)
tree2d9cc6228cc713336a01d9ff09571eacff3a2ba0 /Mac/Modules/Nav.c
parent33d1ad28cba273b94c70ffc22deb6c53b0c1b068 (diff)
downloadcpython-e79dc76f53dfa18fb08c35f71b049259642c0142.zip
cpython-e79dc76f53dfa18fb08c35f71b049259642c0142.tar.gz
cpython-e79dc76f53dfa18fb08c35f71b049259642c0142.tar.bz2
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.
Diffstat (limited to 'Mac/Modules/Nav.c')
-rw-r--r--Mac/Modules/Nav.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c
index a7bc45c..85fae41 100644
--- a/Mac/Modules/Nav.c
+++ b/Mac/Modules/Nav.c
@@ -323,6 +323,8 @@ navrr_getattr(self, name)
navrrobject *self;
char *name;
{
+ FSSpec fss;
+
if( strcmp(name, "__members__") == 0 )
return Py_BuildValue("sssssss", "version", "validRecord", "replacing",
"isStationery", "translationNeeded", "selection", "fileTranslation");
@@ -355,7 +357,16 @@ navrr_getattr(self, name)
PyErr_Mac(ErrorObject, err);
return NULL;
}
- rvitem = PyMac_BuildFSSpec((FSSpec *)*desc.dataHandle);
+#ifdef TARGET_API_MAC_CARBON
+ if (err=AEGetDescData(&desc, &fss, sizeof(FSSpec))) {
+ Py_DECREF(rv);
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+#else
+ memcpy((void *)&fss, (void *)*desc.dataHandle, sizeof(FSSpec));
+#endif
+ rvitem = PyMac_BuildFSSpec(&fss);
PyList_SetItem(rv, i, rvitem);
AEDisposeDesc(&desc);
}