File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,8 +122,16 @@ findnamedresource(
122122 ok = (h != NULL );
123123 if ( ok && dataptr != NULL ) {
124124 HLock (h );
125+ /* XXXX Unsafe if resource not correctly formatted! */
126+ #ifdef __CFM68K__
127+ /* for cfm68k we take the second pstring */
128+ * dataptr = * ((* h )+ (* * h )+ 1 );
129+ memcpy (dataptr + 1 , (* h )+ (* * h )+ 2 , (int )* dataptr );
130+ #else
131+ /* for ppc we take the first pstring */
125132 * dataptr = * * h ;
126133 memcpy (dataptr + 1 , (* h )+ 1 , (int )* dataptr );
134+ #endif
127135 HUnlock (h );
128136 }
129137 if ( filerh != -1 )
@@ -173,7 +181,7 @@ PyMac_LoadCodeResourceModule(name, pathname)
173181 char * name ;
174182 char * pathname ;
175183{
176- PyObject * m ;
184+ PyObject * m , * d , * s ;
177185 char funcname [258 ];
178186 char * lastdot , * shortname , * packagecontext ;
179187 dl_funcptr p = NULL ;
@@ -246,7 +254,7 @@ PyMac_LoadCodeResourceModule(name, pathname)
246254 "dynamic module not initialized properly" );
247255 return NULL ;
248256 }
249- #if 0
257+ #if 1
250258 /* Remember the filename as the __file__ attribute */
251259 d = PyModule_GetDict (m );
252260 s = PyString_FromString (pathname );
You can’t perform that action at this time.
0 commit comments