[Python-checkins] python/dist/src/Mac/Modules/cf _CFmodule.c, 1.25, 1.26 cfsupport.py, 1.25, 1.26

jackjansen at users.sourceforge.net jackjansen at users.sourceforge.net
Thu Jul 15 16:11:33 CEST 2004


Update of /cvsroot/python/python/dist/src/Mac/Modules/cf
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9228
Modified Files:
	_CFmodule.c cfsupport.py 
Log Message:
CFStringGetUnicode() returned an extra null character at the end of the string.
fixed.
Index: _CFmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cf/_CFmodule.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** _CFmodule.c	15 Jul 2004 13:42:06 -0000	1.25
--- _CFmodule.c	15 Jul 2004 14:11:30 -0000	1.26
***************
*** 2350,2354 ****
 	if( data == NULL ) return PyErr_NoMemory();
 	CFStringGetCharacters(_self->ob_itself, range, data);
! 	_res = (PyObject *)PyUnicode_FromUnicode(data, size);
 	free(data);
 	return _res;
--- 2350,2354 ----
 	if( data == NULL ) return PyErr_NoMemory();
 	CFStringGetCharacters(_self->ob_itself, range, data);
! 	_res = (PyObject *)PyUnicode_FromUnicode(data, size-1);
 	free(data);
 	return _res;
Index: cfsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cf/cfsupport.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** cfsupport.py	15 Jul 2004 13:42:06 -0000	1.25
--- cfsupport.py	15 Jul 2004 14:11:30 -0000	1.26
***************
*** 576,580 ****
 if( data == NULL ) return PyErr_NoMemory();
 CFStringGetCharacters(_self->ob_itself, range, data);
! _res = (PyObject *)PyUnicode_FromUnicode(data, size);
 free(data);
 return _res;
--- 576,580 ----
 if( data == NULL ) return PyErr_NoMemory();
 CFStringGetCharacters(_self->ob_itself, range, data);
! _res = (PyObject *)PyUnicode_FromUnicode(data, size-1);
 free(data);
 return _res;


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /