diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-09-06 20:42:27 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-09-06 20:42:27 (GMT) |
commit | 82a9b60b86e2994904fcd85a36e43552ad99c5fd (patch) | |
tree | b342fb0a65e707da7d3014b8838377b847383bab /Mac/Python | |
parent | 8ba4220637a5eb5dfc4ade6cd2e2b7f1e61bd716 (diff) | |
download | cpython-82a9b60b86e2994904fcd85a36e43552ad99c5fd.zip cpython-82a9b60b86e2994904fcd85a36e43552ad99c5fd.tar.gz cpython-82a9b60b86e2994904fcd85a36e43552ad99c5fd.tar.bz2 |
Use PyString_CHECK_INTERNED.
Diffstat (limited to 'Mac/Python')
-rw-r--r-- | Mac/Python/macimport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Mac/Python/macimport.c b/Mac/Python/macimport.c index 56bda1f..e6c432b 100644 --- a/Mac/Python/macimport.c +++ b/Mac/Python/macimport.c @@ -79,14 +79,14 @@ findnamedresource( static int max_not_a_file = 0; int i; - if (obj && obj->ob_sinterned ) { + if (obj && PyString_Check(obj) && PyString_CHECK_INTERNED(obj) ) { for( i=0; i< max_not_a_file; i++ ) if ( obj == not_a_file[i] ) return 0; } if ( FSMakeFSSpec(0, 0, Pstring(filename), &fss) != noErr ) { /* doesn't exist or is folder */ - if ( obj && max_not_a_file < MAXPATHCOMPONENTS && obj->ob_sinterned ) { + if ( obj && max_not_a_file < MAXPATHCOMPONENTS && PyString_Check(obj) && PyString_CHECK_INTERNED(obj) ) { Py_INCREF(obj); not_a_file[max_not_a_file++] = obj; if (Py_VerboseFlag > 1) @@ -106,7 +106,7 @@ findnamedresource( } else { if ( FSpGetFInfo(&fss, &finfo) != noErr ) { /* doesn't exist or is folder */ - if ( obj && max_not_a_file < MAXPATHCOMPONENTS && obj->ob_sinterned ) { + if ( obj && max_not_a_file < MAXPATHCOMPONENTS && PyString_Check(obj) && PyString_CHECK_INTERNED(obj) ) { Py_INCREF(obj); not_a_file[max_not_a_file++] = obj; if (Py_VerboseFlag > 1) |