[Python-checkins] python/dist/src/Mac/Modules/cf _CFmodule.c, 1.22,
1.22.8.1 cfsupport.py, 1.23, 1.23.8.1
jackjansen at users.sourceforge.net
jackjansen at users.sourceforge.net
Thu Jul 15 16:12:23 CEST 2004
Update of /cvsroot/python/python/dist/src/Mac/Modules/cf
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9438
Modified Files:
Tag: release23-maint
_CFmodule.c cfsupport.py
Log Message:
Backport of 1.26:
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.22
retrieving revision 1.22.8.1
diff -C2 -d -r1.22 -r1.22.8.1
*** _CFmodule.c 31 May 2003 22:09:33 -0000 1.22
--- _CFmodule.c 15 Jul 2004 14:12:20 -0000 1.22.8.1
***************
*** 6,15 ****
- #ifdef _WIN32
- #include "pywintoolbox.h"
- #else
- #include "macglue.h"
#include "pymactoolbox.h"
- #endif
/* Macro to test whether a weak-loaded CFM function exists */
--- 6,10 ----
***************
*** 2002,2006 ****
if( data == NULL ) return PyErr_NoMemory();
CFStringGetCharacters(_self->ob_itself, range, data);
! _res = (PyObject *)PyUnicode_FromUnicode(data, size);
free(data);
return _res;
--- 1997,2001 ----
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.23
retrieving revision 1.23.8.1
diff -C2 -d -r1.23 -r1.23.8.1
*** cfsupport.py 31 May 2003 22:09:33 -0000 1.23
--- cfsupport.py 15 Jul 2004 14:12:20 -0000 1.23.8.1
***************
*** 559,563 ****
if( data == NULL ) return PyErr_NoMemory();
CFStringGetCharacters(_self->ob_itself, range, data);
! _res = (PyObject *)PyUnicode_FromUnicode(data, size);
free(data);
return _res;
--- 559,563 ----
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