summaryrefslogtreecommitdiff
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 09:13:40 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 09:13:40 +0200
commita98c4a984b34f887076f4171b1e3303e164cbddf (patch)
tree78f6f0fbbc6728e24d5478aadb7bfe1d871b244f /Objects/floatobject.c
parentf6f15918087f2fae652634303a79f9cc6bc421ce (diff)
parent06515833fef7b8b5c7968edf72367d94ff7eb1e0 (diff)
downloadcpython-git-a98c4a984b34f887076f4171b1e3303e164cbddf.tar.gz
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 0f37618215..80bf71efd2 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1274,7 +1274,7 @@ float_fromhex(PyObject *cls, PyObject *arg)
* exp+4*ndigits and exp-4*ndigits are within the range of a long.
*/
- s = _PyUnicode_AsStringAndSize(arg, &length);
+ s = PyUnicode_AsUTF8AndSize(arg, &length);
if (s == NULL)
return NULL;
s_end = s + length;
@@ -1628,7 +1628,7 @@ float_getformat(PyTypeObject *v, PyObject* arg)
Py_TYPE(arg)->tp_name);
return NULL;
}
- s = _PyUnicode_AsString(arg);
+ s = PyUnicode_AsUTF8(arg);
if (s == NULL)
return NULL;
if (strcmp(s, "double") == 0) {