summaryrefslogtreecommitdiffstats
path: root/Include/longobject.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-10-14 11:32:13 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-10-14 11:32:13 (GMT)
commit2ec8063cc960d32e244dc6a27567f66a447bbda3 (patch)
tree0bcd652fd3dbcf365ab584d64748d2406eb5c295 /Include/longobject.h
parent1285e5c80562ac84ca8bc0ea39b100215d1808a1 (diff)
downloadcpython-2ec8063cc960d32e244dc6a27567f66a447bbda3.zip
cpython-2ec8063cc960d32e244dc6a27567f66a447bbda3.tar.gz
cpython-2ec8063cc960d32e244dc6a27567f66a447bbda3.tar.bz2
Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPI
* Don't overallocate by 400% when recode is needed: only overallocate on demand using _PyBytesWriter. * Use _PyLong_DigitValue to convert hexadecimal digit to int * Create _PyBytes_DecodeEscapeRecode() subfunction
Diffstat (limited to 'Include/longobject.h')
-rw-r--r--Include/longobject.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index 9574f05..eaf7a7e 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -65,7 +65,8 @@ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
# error "void* different in size from int, long and long long"
#endif /* SIZEOF_VOID_P */
-/* Used by Python/mystrtoul.c and _PyBytes_FromHex(). */
+/* Used by Python/mystrtoul.c, _PyBytes_FromHex(),
+ _PyBytes_DecodeEscapeRecode(), etc. */
#ifndef Py_LIMITED_API
PyAPI_DATA(unsigned char) _PyLong_DigitValue[256];
#endif