diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-09 04:58:54 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-09 04:58:54 (GMT) |
commit | dd96db63f689e2f0d8ae5a1436b3b3395eec7de5 (patch) | |
tree | b2299acac9ce44fc488fc7b2ae2a44548cd5fbb8 /Modules/unicodedata.c | |
parent | e98839a1f48b2915f1cc747884e64f4d6e4c8e7a (diff) | |
download | cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.zip cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.gz cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.bz2 |
This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r-- | Modules/unicodedata.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 8ce280f..abb391a 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -266,7 +266,7 @@ unicodedata_category(PyObject *self, PyObject *args) if (old->category_changed != 0xFF) index = old->category_changed; } - return PyBytes_FromString(_PyUnicode_CategoryNames[index]); + return PyString_FromString(_PyUnicode_CategoryNames[index]); } PyDoc_STRVAR(unicodedata_bidirectional__doc__, @@ -297,7 +297,7 @@ unicodedata_bidirectional(PyObject *self, PyObject *args) else if (old->bidir_changed != 0xFF) index = old->bidir_changed; } - return PyBytes_FromString(_PyUnicode_BidirectionalNames[index]); + return PyString_FromString(_PyUnicode_BidirectionalNames[index]); } PyDoc_STRVAR(unicodedata_combining__doc__, @@ -383,7 +383,7 @@ unicodedata_east_asian_width(PyObject *self, PyObject *args) if (old->category_changed == 0) index = 0; /* unassigned */ } - return PyBytes_FromString(_PyUnicode_EastAsianWidthNames[index]); + return PyString_FromString(_PyUnicode_EastAsianWidthNames[index]); } PyDoc_STRVAR(unicodedata_decomposition__doc__, @@ -414,7 +414,7 @@ unicodedata_decomposition(PyObject *self, PyObject *args) if (self) { const change_record *old = get_old_record(self, c); if (old->category_changed == 0) - return PyBytes_FromString(""); /* unassigned */ + return PyString_FromString(""); /* unassigned */ } if (code < 0 || code >= 0x110000) @@ -453,7 +453,7 @@ unicodedata_decomposition(PyObject *self, PyObject *args) decomp[i] = '\0'; - return PyBytes_FromString(decomp); + return PyString_FromString(decomp); } static void @@ -518,7 +518,7 @@ nfd_nfkd(PyObject *self, PyObject *input, int k) /* Hangul Decomposition adds three characters in a single step, so we need atleast that much room. */ if (space < 3) { - Py_ssize_t newsize = PyBytes_GET_SIZE(result) + 10; + Py_ssize_t newsize = PyString_GET_SIZE(result) + 10; space += 10; if (PyUnicode_Resize(&result, newsize) == -1) return NULL; |