comparison Python/pythonrun.c @ 13552:dd2b5218e069 legacy-trunk

Include macglue.h for some function prototypes, and renamed a few mac-specific functions to have a PyMac_ name.
author Jack Jansen <jack.jansen@cwi.nl>
date Tue, 11 Jul 2000 21:59:16 +0000
parents feab677269e0
children 5b727ab37092
comparison
equal deleted inserted replaced
13551:15b18e0cc3fd 13552:dd2b5218e069
32 #ifdef MS_WIN32 32 #ifdef MS_WIN32
33 #undef BYTE 33 #undef BYTE
34 #include "windows.h" 34 #include "windows.h"
35 #endif 35 #endif
36 36
37 #ifdef macintosh
38 #include "macglue.h"
39 #endif
37 extern char *Py_GetPath(); 40 extern char *Py_GetPath();
38 41
39 extern grammar _PyParser_Grammar; /* From graminit.c */ 42 extern grammar _PyParser_Grammar; /* From graminit.c */
40 43
41 /* Forward */ 44 /* Forward */
559 d = PyModule_GetDict(m); 562 d = PyModule_GetDict(m);
560 ext = filename + strlen(filename) - 4; 563 ext = filename + strlen(filename) - 4;
561 if (strcmp(ext, ".pyc") == 0 || strcmp(ext, ".pyo") == 0 564 if (strcmp(ext, ".pyc") == 0 || strcmp(ext, ".pyo") == 0
562 #ifdef macintosh 565 #ifdef macintosh
563 /* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */ 566 /* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */
564 || getfiletype(filename) == 'PYC ' 567 || PyMac_getfiletype(filename) == 'PYC '
565 || getfiletype(filename) == 'APPL' 568 || PyMac_getfiletype(filename) == 'APPL'
566 #endif /* macintosh */ 569 #endif /* macintosh */
567 ) { 570 ) {
568 /* Try to run a pyc file. First, re-open in binary */ 571 /* Try to run a pyc file. First, re-open in binary */
569 /* Don't close, done in main: fclose(fp); */ 572 /* Don't close, done in main: fclose(fp); */
570 if( (fp = fopen(filename, "rb")) == NULL ) { 573 if( (fp = fopen(filename, "rb")) == NULL ) {