[Python-checkins] r55118 - python/branches/py3k-struni/Objects/unicodeobject.c
walter.doerwald
python-checkins at python.org
Fri May 4 12:48:28 CEST 2007
Author: walter.doerwald
Date: Fri May 4 12:48:27 2007
New Revision: 55118
Modified:
python/branches/py3k-struni/Objects/unicodeobject.c
Log:
Change PyUnicode_EncodeUTF16() so that it returns
bytes objects instead of str8 objects.
Modified: python/branches/py3k-struni/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/unicodeobject.c (original)
+++ python/branches/py3k-struni/Objects/unicodeobject.c Fri May 4 12:48:27 2007
@@ -1726,12 +1726,12 @@
if (s[i] >= 0x10000)
pairs++;
#endif
- v = PyString_FromStringAndSize(NULL,
+ v = PyBytes_FromStringAndSize(NULL,
2 * (size + pairs + (byteorder == 0)));
if (v == NULL)
return NULL;
- p = (unsigned char *)PyString_AS_STRING(v);
+ p = (unsigned char *)PyBytes_AS_STRING(v);
if (byteorder == 0)
STORECHAR(0xFEFF);
if (size == 0)
More information about the Python-checkins
mailing list