Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cbf630f

Browse files
committed
Include macglue.h for some function prototypes, and renamed a few
mac-specific functions to have a PyMac_ name.
1 parent 28fc880 commit cbf630f

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

Python/ceval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
2323
#include "eval.h"
2424
#include "opcode.h"
2525

26+
#ifdef macintosh
27+
#include "macglue.h"
28+
#endif
29+
2630
#include <ctype.h>
2731

2832
#ifdef HAVE_LIMITS_H

Python/import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ write_compiled_module(co, cpathname, mtime)
698698
if (Py_VerboseFlag)
699699
PySys_WriteStderr("# wrote %s\n", cpathname);
700700
#ifdef macintosh
701-
setfiletype(cpathname, 'Pyth', 'PYC ');
701+
PyMac_setfiletype(cpathname, 'Pyth', 'PYC ');
702702
#endif
703703
}
704704

Python/pythonrun.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
3434
#include "windows.h"
3535
#endif
3636

37+
#ifdef macintosh
38+
#include "macglue.h"
39+
#endif
3740
extern char *Py_GetPath();
3841

3942
extern grammar _PyParser_Grammar; /* From graminit.c */
@@ -561,8 +564,8 @@ PyRun_SimpleFile(fp, filename)
561564
if (strcmp(ext, ".pyc") == 0 || strcmp(ext, ".pyo") == 0
562565
#ifdef macintosh
563566
/* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */
564-
|| getfiletype(filename) == 'PYC '
565-
|| getfiletype(filename) == 'APPL'
567+
|| PyMac_getfiletype(filename) == 'PYC '
568+
|| PyMac_getfiletype(filename) == 'APPL'
566569
#endif /* macintosh */
567570
) {
568571
/* Try to run a pyc file. First, re-open in binary */

0 commit comments

Comments
 (0)