@@ -43,13 +43,13 @@ PERFORMANCE OF THIS SOFTWARE.
4343** by __initialize_with_resources.
4444*/
4545
46+ #include <Types.h>
4647#include <Quickdraw.h>
4748#include <SegLoad.h>
4849#include <CodeFragments.h>
4950#include <Files.h>
5051#include <Resources.h>
5152
52-
5353/*
5454** Variables passed from shared lib initialization to PyMac_AddLibResources.
5555*/
@@ -61,7 +61,7 @@ static FSSpec library_fss;
6161** loaded. We always return noErr (we just continue without the resources).
6262*/
6363OSErr pascal
64- __initialize_with_resources (InitBlockPtr data )
64+ __initialize_with_resources (CFragInitBlockPtr data )
6565{
6666 /* Call the MW runtime's initialization routine */
6767/* #ifdef __CFM68K__ */
@@ -72,10 +72,10 @@ __initialize_with_resources(InitBlockPtr data)
7272#endif
7373
7474 if ( data == nil ) return noErr ;
75- if ( data -> fragLocator .where == kOnDiskFlat ) {
75+ if ( data -> fragLocator .where == kDataForkCFragLocator ) {
7676 library_fss = * data -> fragLocator .u .onDisk .fileSpec ;
7777 library_fss_valid = 1 ;
78- } else if ( data -> fragLocator .where == kOnDiskSegmented ) {
78+ } else if ( data -> fragLocator .where == kResourceCFragLocator ) {
7979 library_fss = * data -> fragLocator .u .inSegs .fileSpec ;
8080 library_fss_valid = 1 ;
8181 }
@@ -95,3 +95,16 @@ PyMac_AddLibResources()
9595 (void )FSpOpenResFile (& library_fss , fsRdPerm );
9696}
9797
98+ /*
99+ ** Dummy main() program to keep linker happy: we want to
100+ ** use the MW AppRuntime in our shared library (better than building
101+ ** custom runtime libraries as we did before) but AppRuntime
102+ ** expects a main program. Note that it
103+ */
104+
105+ #pragma export off
106+ int
107+ main (int argc , char * * argv ) {
108+ DebugStr ("\pCannot happen: PythonCore dummy main called!" );
109+ }
110+ #pragma export reset
0 commit comments