diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1998-07-31 09:34:47 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1998-07-31 09:34:47 (GMT) |
commit | 017e0ff1a0aedff9e4cce0e1a55cf18bb51eb458 (patch) | |
tree | 7298f39319703fdbc56d0b58a03dbc991d57d733 | |
parent | abdf93c6dc040d267c82353f17563040314b2623 (diff) | |
download | cpython-017e0ff1a0aedff9e4cce0e1a55cf18bb51eb458.zip cpython-017e0ff1a0aedff9e4cce0e1a55cf18bb51eb458.tar.gz cpython-017e0ff1a0aedff9e4cce0e1a55cf18bb51eb458.tar.bz2 |
The PYD resource should now contain 2 strings: one for the ppc
fragment name and one for the cfm68k fragment name (Just).
Also, some unused variables removed.
-rw-r--r-- | Mac/Python/macimport.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Mac/Python/macimport.c b/Mac/Python/macimport.c index ce6b49e..cf92543 100644 --- a/Mac/Python/macimport.c +++ b/Mac/Python/macimport.c @@ -122,8 +122,16 @@ findnamedresource( ok = (h != NULL); if ( ok && dataptr != NULL ) { HLock(h); + /* XXXX Unsafe if resource not correctly formatted! */ +#ifdef __CFM68K__ + /* for cfm68k we take the second pstring */ + *dataptr = *((*h)+(**h)+1); + memcpy(dataptr+1, (*h)+(**h)+2, (int)*dataptr); +#else + /* for ppc we take the first pstring */ *dataptr = **h; memcpy(dataptr+1, (*h)+1, (int)*dataptr); +#endif HUnlock(h); } if ( filerh != -1 ) @@ -173,7 +181,7 @@ PyMac_LoadCodeResourceModule(name, pathname) char *name; char *pathname; { - PyObject *m; + PyObject *m, *d, *s; char funcname[258]; char *lastdot, *shortname, *packagecontext; dl_funcptr p = NULL; @@ -246,7 +254,7 @@ PyMac_LoadCodeResourceModule(name, pathname) "dynamic module not initialized properly"); return NULL; } -#if 0 +#if 1 /* Remember the filename as the __file__ attribute */ d = PyModule_GetDict(m); s = PyString_FromString(pathname); |