File tree 4 files changed +22
-17
lines changed
4 files changed +22
-17
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,6 @@ typedef struct {
15
15
} PyBytesObject ;
16
16
17
17
PyAPI_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 * * );
30
18
31
19
/* Macros and static inline functions, trading safety for speed */
32
20
#define _PyBytes_CAST (op ) \
@@ -43,7 +31,3 @@ static inline Py_ssize_t PyBytes_GET_SIZE(PyObject *op) {
43
31
return Py_SIZE (self );
44
32
}
45
33
#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" {
8
8
# error "this header requires Py_BUILD_CORE define"
9
9
#endif
10
10
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
+
11
30
12
31
/* Substring Search.
13
32
Original file line number Diff line number Diff line change 8
8
*/
9
9
10
10
#include "Python.h"
11
+ #include "pycore_bytesobject.h" // _PyBytes_Join()
11
12
#include "pycore_call.h" // _PyObject_CallNoArgs()
12
- #include "pycore_object.h"
13
+ #include "pycore_object.h" // _PyObject_GC_UNTRACK()
13
14
#include "pycore_pyerrors.h" // _Py_FatalErrorFormat()
14
15
#include "pycore_pylifecycle.h" // _Py_IsInterpreterFinalizing()
15
16
#include "structmember.h" // PyMemberDef
Original file line number Diff line number Diff line change 1
1
#include <stdbool.h>
2
2
3
3
#include <Python.h>
4
+ #include "pycore_bytesobject.h" // _PyBytes_DecodeEscape()
4
5
#include "pycore_unicodeobject.h" // _PyUnicode_DecodeUnicodeEscapeInternal()
5
6
6
7
#include "tokenizer.h"
You can’t perform that action at this time.
0 commit comments