]> granicus.if.org Git - python/commitdiff
Use PyString_CHECK_INTERNED.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 6 Sep 2002 20:42:27 +0000 (20:42 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 6 Sep 2002 20:42:27 +0000 (20:42 +0000)
Mac/Python/macimport.c

index 56bda1fb340144bb4e3b065225898fffcf4257d9..e6c432b5d55a9ce8e3a9cfec333c51867dcaa756 100644 (file)
@@ -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)