[Python-checkins] python/dist/src/Mac/Python macimport.c,1.14,1.15
jackjansen@sourceforge.net
jackjansen@sourceforge.net
Thu, 11 Apr 2002 13:48:16 -0700
Update of /cvsroot/python/python/dist/src/Mac/Python
In directory usw-pr-cvs1:/tmp/cvs-serv9723/Python/Mac/Python
Modified Files:
macimport.c
Log Message:
Got rid of ifdefs for long-obsolete GUSI versions and other stuff that is now standard (appearance, interned strings)
Index: macimport.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Python/macimport.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** macimport.c 5 Dec 2001 23:27:44 -0000 1.14
--- macimport.c 11 Apr 2002 20:48:14 -0000 1.15
***************
*** 36,57 ****
#include <Files.h>
#include <Resources.h>
- #if 0
- #include <OSUtils.h> /* for Set(Current)A5 */
- #include <StandardFile.h>
- #include <Memory.h>
- #include <Windows.h>
- #include <Traps.h>
- #include <Processes.h>
- #include <Fonts.h>
- #include <Menus.h>
- #include <TextUtils.h>
- #endif
#include <CodeFragments.h>
#include <StringCompare.h>
- #ifdef USE_GUSI1
- #include "TFileSpec.h" /* for Path2FSSpec() */
- #endif
-
typedef void (*dl_funcptr)();
#define FUNCNAME_PATTERN "init%.200s"
--- 36,42 ----
***************
*** 83,87 ****
Handle h;
- #ifdef INTERN_STRINGS
/*
** If we have interning find_module takes care of interning all
--- 68,71 ----
***************
*** 101,114 ****
return 0;
}
- #endif /* INTERN_STRINGS */
- #ifdef USE_GUSI1
- if ( Path2FSSpec(filename, &fss) != noErr ) {
- #else
if ( FSMakeFSSpec(0, 0, Pstring(filename), &fss) != noErr ) {
- #endif
- #ifdef INTERN_STRINGS
if ( obj && max_not_a_file < MAXPATHCOMPONENTS && obj->ob_sinterned )
not_a_file[max_not_a_file++] = obj;
- #endif /* INTERN_STRINGS */
/* doesn't exist or is folder */
return 0;
--- 85,91 ----
***************
*** 124,128 ****
filerh = -1;
} else {
- #ifdef INTERN_STRINGS
if ( FSpGetFInfo(&fss, &finfo) != noErr ) {
if ( obj && max_not_a_file < MAXPATHCOMPONENTS && obj->ob_sinterned )
--- 101,104 ----
***************
*** 131,135 ****
return 0;
}
- #endif /* INTERN_STRINGS */
oldrh = CurResFile();
filerh = FSpOpenResFile(&fss, fsRdPerm);
--- 107,110 ----
***************
*** 271,275 ****
return NULL;
}
- #if 1
/* Remember the filename as the __file__ attribute */
d = PyModule_GetDict(m);
--- 246,249 ----
***************
*** 278,282 ****
PyErr_Clear(); /* Not important enough to report */
Py_XDECREF(s);
- #endif
if (Py_VerboseFlag)
PySys_WriteStderr("import %s # pyd fragment %#s loaded from %s\n",
--- 252,255 ----
***************
*** 302,311 ****
long num, size;
- #ifdef USE_GUSI1
- if ( (err=Path2FSSpec(filename, &fss)) != noErr ||
- FSpGetFInfo(&fss, &finfo) != noErr )
- #else
if ( (err=FSMakeFSSpec(0, 0, Pstring(filename), &fss)) != noErr )
- #endif
goto error;
if ( fssequal(&fss, &PyMac_ApplicationFSSpec) ) {
--- 275,279 ----
***************
*** 424,430 ****
int modnamelen = strlen(module);
FSSpec fss;
- #ifdef USE_GUSI1
- FInfo finfo;
- #endif
short refnum;
long dirid;
--- 392,395 ----
***************
*** 439,450 ****
strcpy(buf+*lenp, _PyImport_Filetab[0].suffix);
- #ifdef USE_GUSI1
- if ( Path2FSSpec(buf, &fss) == noErr &&
- FSpGetFInfo(&fss, &finfo) == noErr)
- return _PyImport_Filetab;
- #else
if ( FSMakeFSSpec(0, 0, Pstring(buf), &fss) == noErr )
return _PyImport_Filetab;
- #endif
/*
** We cannot check for fnfErr (unfortunately), it can mean either that
--- 404,409 ----