mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
Include macglue.h for some function prototypes, and renamed a few
mac-specific functions to have a PyMac_ name.
This commit is contained in:
parent
28fc880e9a
commit
cbf630f0a9
@ -23,6 +23,10 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
#include "eval.h"
|
||||
#include "opcode.h"
|
||||
|
||||
#ifdef macintosh
|
||||
#include "macglue.h"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
|
@ -698,7 +698,7 @@ write_compiled_module(co, cpathname, mtime)
|
||||
if (Py_VerboseFlag)
|
||||
PySys_WriteStderr("# wrote %s\n", cpathname);
|
||||
#ifdef macintosh
|
||||
setfiletype(cpathname, 'Pyth', 'PYC ');
|
||||
PyMac_setfiletype(cpathname, 'Pyth', 'PYC ');
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,9 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
#ifdef macintosh
|
||||
#include "macglue.h"
|
||||
#endif
|
||||
extern char *Py_GetPath();
|
||||
|
||||
extern grammar _PyParser_Grammar; /* From graminit.c */
|
||||
@ -561,8 +564,8 @@ PyRun_SimpleFile(fp, filename)
|
||||
if (strcmp(ext, ".pyc") == 0 || strcmp(ext, ".pyo") == 0
|
||||
#ifdef macintosh
|
||||
/* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */
|
||||
|| getfiletype(filename) == 'PYC '
|
||||
|| getfiletype(filename) == 'APPL'
|
||||
|| PyMac_getfiletype(filename) == 'PYC '
|
||||
|| PyMac_getfiletype(filename) == 'APPL'
|
||||
#endif /* macintosh */
|
||||
) {
|
||||
/* Try to run a pyc file. First, re-open in binary */
|
||||
|
Loading…
Reference in New Issue
Block a user