[Python-checkins] python/dist/src/Mac/Python macimport.c,1.16,1.17

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Fri, 06 Sep 2002 13:42:29 -0700


Update of /cvsroot/python/python/dist/src/Mac/Python
In directory usw-pr-cvs1:/tmp/cvs-serv11825/Python/Mac/Python

Modified Files:
	macimport.c 
Log Message:
Use PyString_CHECK_INTERNED.

Index: macimport.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Python/macimport.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** macimport.c	22 Jul 2002 12:35:22 -0000	1.16
--- macimport.c	6 Sep 2002 20:42:27 -0000	1.17
***************
*** 80,84 ****
  	int i;
  		
! 	if (obj && obj->ob_sinterned ) {
  		for( i=0; i< max_not_a_file; i++ )
  			if ( obj == not_a_file[i] )
--- 80,84 ----
  	int i;
  		
! 	if (obj && PyString_Check(obj) && PyString_CHECK_INTERNED(obj) ) {
  		for( i=0; i< max_not_a_file; i++ )
  			if ( obj == not_a_file[i] )
***************
*** 87,91 ****
  	if ( FSMakeFSSpec(0, 0, Pstring(filename), &fss) != noErr ) {
  	     /* doesn't exist or is folder */
! 		if ( obj && max_not_a_file < MAXPATHCOMPONENTS && obj->ob_sinterned ) {
  			Py_INCREF(obj);
  			not_a_file[max_not_a_file++] = obj;
--- 87,91 ----
  	if ( FSMakeFSSpec(0, 0, Pstring(filename), &fss) != noErr ) {
  	     /* doesn't exist or is folder */
! 		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;
***************
*** 107,111 ****
       	if ( FSpGetFInfo(&fss, &finfo) != noErr ) {
       		/* doesn't exist or is folder */
! 			if ( obj && max_not_a_file < MAXPATHCOMPONENTS && obj->ob_sinterned ) {
  				Py_INCREF(obj);
  				not_a_file[max_not_a_file++] = obj;
--- 107,111 ----
       	if ( FSpGetFInfo(&fss, &finfo) != noErr ) {
       		/* doesn't exist or is folder */
! 			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;