[Python-checkins] python/dist/src/Mac/Modules/cf cfsupport.py,1.20,1.21 pycfbridge.c,1.6,1.7

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Mon, 03 Mar 2003 05:19:46 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/cf
In directory sc8-pr-cvs1:/tmp/cvs-serv19892

Modified Files:
	cfsupport.py pycfbridge.c 
Log Message:
Mod to previous checkin: we must require ascii, not system defautl encoding,
because we have no easy way to convert the python encoding string to
a CF encoding parameter.


Index: cfsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cf/cfsupport.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** cfsupport.py	3 Mar 2003 13:12:59 -0000	1.20
--- cfsupport.py	3 Mar 2003 13:19:43 -0000	1.21
***************
*** 361,365 ****
  		if (PyString_Check(v)) {
  		    char *cStr;
! 		    if (!PyArg_Parse(v, "et", "ascii", &cStr))
  		    	return NULL;
  			*p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
--- 361,365 ----
  		if (PyString_Check(v)) {
  		    char *cStr;
! 		    if (!PyArg_Parse(v, "es", "ascii", &cStr))
  		    	return NULL;
  			*p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);

Index: pycfbridge.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cf/pycfbridge.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** pycfbridge.c	3 Mar 2003 13:12:59 -0000	1.6
--- pycfbridge.c	3 Mar 2003 13:19:44 -0000	1.7
***************
*** 293,297 ****
  	
  	if (PyString_Check(src)) {
! 		if (!PyArg_Parse(src, "es", NULL, &chars))
  			return NULL; /* This error is more descriptive than the general one below */
  		*dst = CFStringCreateWithCString((CFAllocatorRef)NULL, chars, kCFStringEncodingASCII);
--- 293,297 ----
  	
  	if (PyString_Check(src)) {
! 		if (!PyArg_Parse(src, "es", "ascii", &chars))
  			return NULL; /* This error is more descriptive than the general one below */
  		*dst = CFStringCreateWithCString((CFAllocatorRef)NULL, chars, kCFStringEncodingASCII);