summaryrefslogtreecommitdiff
path: root/Include/longobject.h
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-10-22 03:21:36 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-10-22 03:21:36 +0000
commit73a0af3545f0e9b62ac149367c0cfbdbfe40afe4 (patch)
tree9db0bac0a71ca7296ff714745c0f4eee0b07f6a5 /Include/longobject.h
parent6f5021addeb1d9ddd3610409d2461ec79870f9a5 (diff)
parent6fec8a2a83b0f93a80bb83e76dceeda1cf9d00dc (diff)
downloadcpython-73a0af3545f0e9b62ac149367c0cfbdbfe40afe4.tar.gz
Issue #28435: Merge urllib test fixes from 3.5 into 3.6
Diffstat (limited to 'Include/longobject.h')
-rw-r--r--Include/longobject.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index 2a2eecf107..efd409c75a 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. */
+/* Used by Python/mystrtoul.c, _PyBytes_FromHex(),
+ _PyBytes_DecodeEscapeRecode(), etc. */
#ifndef Py_LIMITED_API
PyAPI_DATA(unsigned char) _PyLong_DigitValue[256];
#endif
@@ -84,14 +85,12 @@ PyAPI_FUNC(double) PyLong_AsDouble(PyObject *);
PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *);
PyAPI_FUNC(void *) PyLong_AsVoidPtr(PyObject *);
-#ifdef HAVE_LONG_LONG
-PyAPI_FUNC(PyObject *) PyLong_FromLongLong(PY_LONG_LONG);
-PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG);
-PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLong(PyObject *);
-PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *);
-PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);
-PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLongAndOverflow(PyObject *, int *);
-#endif /* HAVE_LONG_LONG */
+PyAPI_FUNC(PyObject *) PyLong_FromLongLong(long long);
+PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned long long);
+PyAPI_FUNC(long long) PyLong_AsLongLong(PyObject *);
+PyAPI_FUNC(unsigned long long) PyLong_AsUnsignedLongLong(PyObject *);
+PyAPI_FUNC(unsigned long long) PyLong_AsUnsignedLongLongMask(PyObject *);
+PyAPI_FUNC(long long) PyLong_AsLongLongAndOverflow(PyObject *, int *);
PyAPI_FUNC(PyObject *) PyLong_FromString(const char *, char **, int);
#ifndef Py_LIMITED_API
@@ -182,6 +181,13 @@ PyAPI_FUNC(int) _PyLong_FormatWriter(
int base,
int alternate);
+PyAPI_FUNC(char*) _PyLong_FormatBytesWriter(
+ _PyBytesWriter *writer,
+ char *str,
+ PyObject *obj,
+ int base,
+ int alternate);
+
/* Format the object based on the format_spec, as defined in PEP 3101
(Advanced String Formatting). */
PyAPI_FUNC(int) _PyLong_FormatAdvancedWriter(
@@ -198,8 +204,10 @@ PyAPI_FUNC(int) _PyLong_FormatAdvancedWriter(
PyAPI_FUNC(unsigned long) PyOS_strtoul(const char *, char **, int);
PyAPI_FUNC(long) PyOS_strtol(const char *, char **, int);
+#ifndef Py_LIMITED_API
/* For use by the gcd function in mathmodule.c */
PyAPI_FUNC(PyObject *) _PyLong_GCD(PyObject *, PyObject *);
+#endif /* !Py_LIMITED_API */
#ifdef __cplusplus
}