File tree Expand file tree Collapse file tree 4 files changed +22
-17
lines changed Expand file tree Collapse file tree 4 files changed +22
-17
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,6 @@ typedef struct {
1515} PyBytesObject ;
1616
1717PyAPI_FUNC (int ) _PyBytes_Resize (PyObject * * , Py_ssize_t );
18- PyAPI_FUNC (PyObject * ) _PyBytes_FormatEx (
19- const char * format ,
20- Py_ssize_t format_len ,
21- PyObject * args ,
22- int use_bytearray );
23- PyAPI_FUNC (PyObject * ) _PyBytes_FromHex (
24- PyObject * string ,
25- int use_bytearray );
26-
27- /* Helper for PyBytes_DecodeEscape that detects invalid escape chars. */
28- PyAPI_FUNC (PyObject * ) _PyBytes_DecodeEscape (const char * , Py_ssize_t ,
29- const char * , const char * * );
3018
3119/* Macros and static inline functions, trading safety for speed */
3220#define _PyBytes_CAST (op ) \
@@ -43,7 +31,3 @@ static inline Py_ssize_t PyBytes_GET_SIZE(PyObject *op) {
4331 return Py_SIZE (self );
4432}
4533#define PyBytes_GET_SIZE (self ) PyBytes_GET_SIZE(_PyObject_CAST(self))
46-
47- /* _PyBytes_Join(sep, x) is like sep.join(x). sep must be PyBytesObject*,
48- x must be an iterable object. */
49- PyAPI_FUNC (PyObject * ) _PyBytes_Join (PyObject * sep , PyObject * x );
Original file line number Diff line number Diff line change @@ -8,6 +8,25 @@ extern "C" {
88# error "this header requires Py_BUILD_CORE define"
99#endif
1010
11+ extern PyObject * _PyBytes_FormatEx (
12+ const char * format ,
13+ Py_ssize_t format_len ,
14+ PyObject * args ,
15+ int use_bytearray );
16+
17+ extern PyObject * _PyBytes_FromHex (
18+ PyObject * string ,
19+ int use_bytearray );
20+
21+ // Helper for PyBytes_DecodeEscape that detects invalid escape chars.
22+ // Export for test_peg_generator.
23+ PyAPI_FUNC (PyObject * ) _PyBytes_DecodeEscape (const char * , Py_ssize_t ,
24+ const char * , const char * * );
25+
26+ /* _PyBytes_Join(sep, x) is like sep.join(x). sep must be PyBytesObject*,
27+ x must be an iterable object. */
28+ extern PyObject * _PyBytes_Join (PyObject * sep , PyObject * x );
29+
1130
1231/* Substring Search.
1332
Original file line number Diff line number Diff line change 88*/
99
1010#include "Python.h"
11+ #include "pycore_bytesobject.h" // _PyBytes_Join()
1112#include "pycore_call.h" // _PyObject_CallNoArgs()
12- #include "pycore_object.h"
13+ #include "pycore_object.h" // _PyObject_GC_UNTRACK()
1314#include "pycore_pyerrors.h" // _Py_FatalErrorFormat()
1415#include "pycore_pylifecycle.h" // _Py_IsInterpreterFinalizing()
1516#include "structmember.h" // PyMemberDef
Original file line number Diff line number Diff line change 11#include <stdbool.h>
22
33#include <Python.h>
4+ #include "pycore_bytesobject.h" // _PyBytes_DecodeEscape()
45#include "pycore_unicodeobject.h" // _PyUnicode_DecodeUnicodeEscapeInternal()
56
67#include "tokenizer.h"
You can’t perform that action at this time.
0 commit comments