summaryrefslogtreecommitdiff
path: root/Modules/unicodedata.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-05-27 08:36:52 +0000
committerMartin v. Löwis <martin@v.loewis.de>2006-05-27 08:36:52 +0000
commit115d7159a2df934c1f51cace373ee97397ff424f (patch)
treefee337a6563e014845a9e9cc86edbe83b79e81b3 /Modules/unicodedata.c
parent23b47f38690d52c42e9f7b93bf6021e9f7a7bb84 (diff)
downloadcpython-115d7159a2df934c1f51cace373ee97397ff424f.tar.gz
Patch 1494554: Update numeric properties to Unicode 4.1.
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r--Modules/unicodedata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 297611cec4..0660353a80 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -209,7 +209,7 @@ unicodedata_numeric(PyObject *self, PyObject *args)
if (old->category_changed == 0) {
/* unassigned */
have_old = 1;
- rc = -1;
+ rc = -1.0;
}
else if (old->decimal_changed != 0xFF) {
have_old = 1;
@@ -219,7 +219,7 @@ unicodedata_numeric(PyObject *self, PyObject *args)
if (!have_old)
rc = Py_UNICODE_TONUMERIC(*PyUnicode_AS_UNICODE(v));
- if (rc < 0) {
+ if (rc == -1.0) {
if (defobj == NULL) {
PyErr_SetString(PyExc_ValueError, "not a numeric character");
return NULL;