mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
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.
This commit is contained in:
parent
abdf93c6dc
commit
017e0ff1a0
1 changed files with 10 additions and 2 deletions
|
@ -122,8 +122,16 @@ findnamedresource(
|
||||||
ok = (h != NULL);
|
ok = (h != NULL);
|
||||||
if ( ok && dataptr != NULL ) {
|
if ( ok && dataptr != NULL ) {
|
||||||
HLock(h);
|
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;
|
*dataptr = **h;
|
||||||
memcpy(dataptr+1, (*h)+1, (int)*dataptr);
|
memcpy(dataptr+1, (*h)+1, (int)*dataptr);
|
||||||
|
#endif
|
||||||
HUnlock(h);
|
HUnlock(h);
|
||||||
}
|
}
|
||||||
if ( filerh != -1 )
|
if ( filerh != -1 )
|
||||||
|
@ -173,7 +181,7 @@ PyMac_LoadCodeResourceModule(name, pathname)
|
||||||
char *name;
|
char *name;
|
||||||
char *pathname;
|
char *pathname;
|
||||||
{
|
{
|
||||||
PyObject *m;
|
PyObject *m, *d, *s;
|
||||||
char funcname[258];
|
char funcname[258];
|
||||||
char *lastdot, *shortname, *packagecontext;
|
char *lastdot, *shortname, *packagecontext;
|
||||||
dl_funcptr p = NULL;
|
dl_funcptr p = NULL;
|
||||||
|
@ -246,7 +254,7 @@ PyMac_LoadCodeResourceModule(name, pathname)
|
||||||
"dynamic module not initialized properly");
|
"dynamic module not initialized properly");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#if 0
|
#if 1
|
||||||
/* Remember the filename as the __file__ attribute */
|
/* Remember the filename as the __file__ attribute */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
s = PyString_FromString(pathname);
|
s = PyString_FromString(pathname);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue