| LEFT | RIGHT |
| 1 #ifndef Py_LONGOBJECT_H | 1 #ifndef Py_LONGOBJECT_H |
| 2 #define Py_LONGOBJECT_H | 2 #define Py_LONGOBJECT_H |
| 3 #ifdef __cplusplus | 3 #ifdef __cplusplus |
| 4 extern "C" { | 4 extern "C" { |
| 5 #endif | 5 #endif |
| 6 | 6 |
| 7 | 7 |
| 8 /* Long (arbitrary precision) integer object interface */ | 8 /* Long (arbitrary precision) integer object interface */ |
| 9 | 9 |
| 10 typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */ | 10 typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */ |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 */ | 146 */ |
| 147 PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v, | 147 PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v, |
| 148 unsigned char* bytes, size_t n, | 148 unsigned char* bytes, size_t n, |
| 149 int little_endian, int is_signed); | 149 int little_endian, int is_signed); |
| 150 | 150 |
| 151 | 151 |
| 152 /* _PyLong_Format: Convert the long to a string object with given base, | 152 /* _PyLong_Format: Convert the long to a string object with given base, |
| 153 appending a base prefix of 0[box] if base is 2, 8 or 16. */ | 153 appending a base prefix of 0[box] if base is 2, 8 or 16. */ |
| 154 PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *aa, int base); | 154 PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *aa, int base); |
| 155 | 155 |
| 156 PyAPI_FUNC(int) _PyLong_FormatWriter( |
| 157 PyObject *aa, |
| 158 int base, |
| 159 int alternate, |
| 160 _PyUnicodeWriter *writer); |
| 161 |
| 156 /* Format the object based on the format_spec, as defined in PEP 3101 | 162 /* Format the object based on the format_spec, as defined in PEP 3101 |
| 157 (Advanced String Formatting). Return 0 on success, raise an exception | 163 (Advanced String Formatting). */ |
| 158 and return -1 on error. */ | 164 PyAPI_FUNC(int) _PyLong_FormatAdvancedWriter( |
| 159 PyAPI_FUNC(int) _PyLong_FormatWriter(PyObject *obj, | 165 PyObject *obj, |
| 160 PyObject *format_spec, | 166 PyObject *format_spec, |
| 161 Py_ssize_t start, | 167 Py_ssize_t start, |
| 162 Py_ssize_t end, | 168 Py_ssize_t end, |
| 163 _PyUnicodeWriter *writer); | 169 _PyUnicodeWriter *writer); |
| 164 #endif /* Py_LIMITED_API */ | 170 #endif /* Py_LIMITED_API */ |
| 165 | 171 |
| 166 /* These aren't really part of the long object, but they're handy. The | 172 /* These aren't really part of the long object, but they're handy. The |
| 167 functions are in Python/mystrtoul.c. | 173 functions are in Python/mystrtoul.c. |
| 168 */ | 174 */ |
| 169 PyAPI_FUNC(unsigned long) PyOS_strtoul(char *, char **, int); | 175 PyAPI_FUNC(unsigned long) PyOS_strtoul(char *, char **, int); |
| 170 PyAPI_FUNC(long) PyOS_strtol(char *, char **, int); | 176 PyAPI_FUNC(long) PyOS_strtol(char *, char **, int); |
| 171 | 177 |
| 172 #ifdef __cplusplus | 178 #ifdef __cplusplus |
| 173 } | 179 } |
| 174 #endif | 180 #endif |
| 175 #endif /* !Py_LONGOBJECT_H */ | 181 #endif /* !Py_LONGOBJECT_H */ |
| LEFT | RIGHT |