[Python-checkins] CVS: python/dist/src/Mac/Modules/cf cfscan.py,1.2,1.3

Jack Jansen jackjansen@users.sourceforge.net
Thu, 28 Jun 2001 15:08:24 -0700


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

Modified Files:
	cfscan.py 
Log Message:
Added CFURL support, and got base chaining to really work.

Index: cfscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cf/cfscan.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** cfscan.py	2001/06/27 22:00:50	1.2
--- cfscan.py	2001/06/28 22:08:22	1.3
***************
*** 14,18 ****
  		"CFDataRef", "CFMutableDataRef",
  		"CFDictionaryRef", "CFMutableDictionaryRef",
! 		"CFStringRef", "CFMutableStringRef", 
  		)
  # ADD object typenames here
--- 14,19 ----
  		"CFDataRef", "CFMutableDataRef",
  		"CFDictionaryRef", "CFMutableDictionaryRef",
! 		"CFStringRef", "CFMutableStringRef",
! 		"CFURLRef",
  		)
  # ADD object typenames here
***************
*** 36,40 ****
  ##		"CFStringEncodingExt.h",
  ##		"CFTimeZone.h",
! ##		"CFURL.h",
  		]
  	output = SHORT + "gen.py"
--- 37,41 ----
  ##		"CFStringEncodingExt.h",
  ##		"CFTimeZone.h",
! 		"CFURL.h",
  		]
  	output = SHORT + "gen.py"
***************
*** 82,86 ****
  			"CFStringGetPascalStringPtr", # TBD automatically
  			"CFStringGetCStringPtr", 
! 			"CFStringGetCharactersPtr", 
  			]
  
--- 83,90 ----
  			"CFStringGetPascalStringPtr", # TBD automatically
  			"CFStringGetCStringPtr", 
! 			"CFStringGetCharactersPtr",
! 			# OSX only, to be done
! 			"CFURLCreateWithFileSystemPath",
! 			"CFURLCreateStringWithFileSystemPath",
  			]
  
***************
*** 105,112 ****
--- 109,124 ----
  	def makerepairinstructions(self):
  		return [
+ 			# Buffers in CF seem to be passed as UInt8 * normally.
  			([("UInt8_ptr", "*", "InMode"), ("CFIndex", "*", "InMode")],
  			 [("UcharInBuffer", "*", "*")]),
+ 			 
+ 			# Some functions return a const char *. Don't worry, we won't modify it.
  			([("const_char_ptr", "*", "ReturnMode")],
  			 [("return_stringptr", "*", "*")]),
+ 			 
+ 			# base URLs are optional (pass None for NULL)
+ 			([("CFURLRef", "baseURL", "InMode")],
+ 			 [("OptionalCFURLRef", "*", "*")]),
+ 			 
  			]