CFStringGetUnicode() returned an extra null character at the end of the string.
fixed.
This commit is contained in:
parent
3bfc28c12f
commit
d9e50f554f
|
@ -2349,7 +2349,7 @@ static PyObject *CFStringRefObj_CFStringGetUnicode(CFStringRefObject *_self, PyO
|
|||
range.length = size;
|
||||
if( data == NULL ) return PyErr_NoMemory();
|
||||
CFStringGetCharacters(_self->ob_itself, range, data);
|
||||
_res = (PyObject *)PyUnicode_FromUnicode(data, size);
|
||||
_res = (PyObject *)PyUnicode_FromUnicode(data, size-1);
|
||||
free(data);
|
||||
return _res;
|
||||
|
||||
|
|
|
@ -575,7 +575,7 @@ range.location = 0;
|
|||
range.length = size;
|
||||
if( data == NULL ) return PyErr_NoMemory();
|
||||
CFStringGetCharacters(_self->ob_itself, range, data);
|
||||
_res = (PyObject *)PyUnicode_FromUnicode(data, size);
|
||||
_res = (PyObject *)PyUnicode_FromUnicode(data, size-1);
|
||||
free(data);
|
||||
return _res;
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue