Skip to content

Commit 768e879

Browse files
committed
[GR-44984] Initial PyO3 support
PullRequest: graalpython/2824
2 parents 68da934 + 3ae39c9 commit 768e879

File tree

17 files changed

+1562
-1207
lines changed

17 files changed

+1562
-1207
lines changed

graalpython/com.oracle.graal.python.cext/src/bytearrayobject.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -47,6 +47,14 @@ char* _PyByteArray_Start(PyObject* obj) {
4747
return PyByteArrayObject_ob_start(obj);
4848
}
4949

50+
char* PyByteArray_AsString(PyObject* obj) {
51+
return PyByteArray_AS_STRING(obj);
52+
}
53+
54+
Py_ssize_t PyByteArray_Size(PyObject *self) {
55+
return PyByteArray_GET_SIZE(self);
56+
}
57+
5058
// taken from CPython 3.7.0 "Objects/bytearrayobject.c"
5159
int bytearray_getbuffer(PyByteArrayObject *obj, Py_buffer *view, int flags) {
5260
void *ptr;

graalpython/com.oracle.graal.python.cext/src/capi.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,10 @@ PyAPI_FUNC(PyObject*) PyDict_GetItem(PyObject* a, PyObject* b) {
15651565
PyAPI_FUNC(PyObject*) PyDict_GetItemWithError(PyObject* a, PyObject* b) {
15661566
return GraalPyDict_GetItemWithError(a, b);
15671567
}
1568+
#undef PyDict_Items
1569+
PyAPI_FUNC(PyObject*) PyDict_Items(PyObject* a) {
1570+
return GraalPyDict_Items(a);
1571+
}
15681572
#undef PyDict_Keys
15691573
PyAPI_FUNC(PyObject*) PyDict_Keys(PyObject* a) {
15701574
return GraalPyDict_Keys(a);
@@ -1629,6 +1633,10 @@ PyAPI_FUNC(void) PyErr_Restore(PyObject* a, PyObject* b, PyObject* c) {
16291633
PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject* a, PyObject* b, PyObject* c) {
16301634
GraalPyErr_SetExcInfo(a, b, c);
16311635
}
1636+
#undef PyErr_WarnExplicit
1637+
PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject* a, const char* b, const char* c, int d, const char* e, PyObject* f) {
1638+
return GraalPyErr_WarnExplicit(a, truffleString(b), truffleString(c), d, truffleString(e), f);
1639+
}
16321640
#undef PyEval_GetBuiltins
16331641
PyAPI_FUNC(PyObject*) PyEval_GetBuiltins() {
16341642
return GraalPyEval_GetBuiltins();
@@ -1641,6 +1649,10 @@ PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState* a) {
16411649
PyAPI_FUNC(PyThreadState*) PyEval_SaveThread() {
16421650
return GraalPyEval_SaveThread();
16431651
}
1652+
#undef PyException_GetCause
1653+
PyAPI_FUNC(PyObject*) PyException_GetCause(PyObject* a) {
1654+
return GraalPyException_GetCause(a);
1655+
}
16441656
#undef PyException_GetContext
16451657
PyAPI_FUNC(PyObject*) PyException_GetContext(PyObject* a) {
16461658
return GraalPyException_GetContext(a);
@@ -2021,10 +2033,18 @@ PyAPI_FUNC(PyObject*) PySequence_Concat(PyObject* a, PyObject* b) {
20212033
PyAPI_FUNC(int) PySequence_Contains(PyObject* a, PyObject* b) {
20222034
return GraalPySequence_Contains(a, b);
20232035
}
2036+
#undef PySequence_Count
2037+
PyAPI_FUNC(Py_ssize_t) PySequence_Count(PyObject* a, PyObject* b) {
2038+
return GraalPySequence_Count(a, b);
2039+
}
20242040
#undef PySequence_DelItem
20252041
PyAPI_FUNC(int) PySequence_DelItem(PyObject* a, Py_ssize_t b) {
20262042
return GraalPySequence_DelItem(a, b);
20272043
}
2044+
#undef PySequence_DelSlice
2045+
PyAPI_FUNC(int) PySequence_DelSlice(PyObject* a, Py_ssize_t b, Py_ssize_t c) {
2046+
return GraalPySequence_DelSlice(a, b, c);
2047+
}
20282048
#undef PySequence_GetItem
20292049
PyAPI_FUNC(PyObject*) PySequence_GetItem(PyObject* a, Py_ssize_t b) {
20302050
return GraalPySequence_GetItem(a, b);
@@ -2041,6 +2061,10 @@ PyAPI_FUNC(PyObject*) PySequence_InPlaceConcat(PyObject* a, PyObject* b) {
20412061
PyAPI_FUNC(PyObject*) PySequence_InPlaceRepeat(PyObject* a, Py_ssize_t b) {
20422062
return GraalPySequence_InPlaceRepeat(a, b);
20432063
}
2064+
#undef PySequence_Index
2065+
PyAPI_FUNC(Py_ssize_t) PySequence_Index(PyObject* a, PyObject* b) {
2066+
return GraalPySequence_Index(a, b);
2067+
}
20442068
#undef PySequence_Length
20452069
PyAPI_FUNC(Py_ssize_t) PySequence_Length(PyObject* a) {
20462070
return GraalPySequence_Length(a);
@@ -2057,6 +2081,10 @@ PyAPI_FUNC(PyObject*) PySequence_Repeat(PyObject* a, Py_ssize_t b) {
20572081
PyAPI_FUNC(int) PySequence_SetItem(PyObject* a, Py_ssize_t b, PyObject* c) {
20582082
return GraalPySequence_SetItem(a, b, c);
20592083
}
2084+
#undef PySequence_SetSlice
2085+
PyAPI_FUNC(int) PySequence_SetSlice(PyObject* a, Py_ssize_t b, Py_ssize_t c, PyObject* d) {
2086+
return GraalPySequence_SetSlice(a, b, c, d);
2087+
}
20602088
#undef PySequence_Size
20612089
PyAPI_FUNC(Py_ssize_t) PySequence_Size(PyObject* a) {
20622090
return GraalPySequence_Size(a);
@@ -2197,6 +2225,10 @@ PyAPI_FUNC(Py_ssize_t) PyTuple_Size(PyObject* a) {
21972225
PyAPI_FUNC(int) PyType_IsSubtype(PyTypeObject* a, PyTypeObject* b) {
21982226
return GraalPyType_IsSubtype(a, b);
21992227
}
2228+
#undef PyUnicodeDecodeError_Create
2229+
PyAPI_FUNC(PyObject*) PyUnicodeDecodeError_Create(const char* a, const char* b, Py_ssize_t c, Py_ssize_t d, Py_ssize_t e, const char* f) {
2230+
return GraalPyUnicodeDecodeError_Create(truffleString(a), b, c, d, e, truffleString(f));
2231+
}
22002232
#undef PyUnicode_AsEncodedString
22012233
PyAPI_FUNC(PyObject*) PyUnicode_AsEncodedString(PyObject* a, const char* b, const char* c) {
22022234
return GraalPyUnicode_AsEncodedString(a, truffleString(b), truffleString(c));
@@ -2285,6 +2317,10 @@ PyAPI_FUNC(PyObject*) PyWeakref_NewRef(PyObject* a, PyObject* b) {
22852317
PyAPI_FUNC(int) Py_AtExit(void (*a)(void)) {
22862318
return GraalPy_AtExit(a);
22872319
}
2320+
#undef Py_CompileString
2321+
PyAPI_FUNC(PyObject*) Py_CompileString(const char* a, const char* b, int c) {
2322+
return GraalPy_CompileString(truffleString(a), truffleString(b), c);
2323+
}
22882324
#undef Py_EnterRecursiveCall
22892325
PyAPI_FUNC(int) Py_EnterRecursiveCall(const char* a) {
22902326
return GraalPy_EnterRecursiveCall(a);

graalpython/com.oracle.graal.python.cext/src/capi.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ typedef struct {
129129
BUILTIN(PyDict_DelItem, int, PyObject*, PyObject*) \
130130
BUILTIN(PyDict_GetItem, PyObject*, PyObject*, PyObject*) \
131131
BUILTIN(PyDict_GetItemWithError, PyObject*, PyObject*, PyObject*) \
132+
BUILTIN(PyDict_Items, PyObject*, PyObject*) \
132133
BUILTIN(PyDict_Keys, PyObject*, PyObject*) \
133134
BUILTIN(PyDict_Merge, int, PyObject*, PyObject*, int) \
134135
BUILTIN(PyDict_New, PyObject*) \
@@ -145,9 +146,11 @@ typedef struct {
145146
BUILTIN(PyErr_PrintEx, void, int) \
146147
BUILTIN(PyErr_Restore, void, PyObject*, PyObject*, PyObject*) \
147148
BUILTIN(PyErr_SetExcInfo, void, PyObject*, PyObject*, PyObject*) \
149+
BUILTIN(PyErr_WarnExplicit, int, PyObject*, const char*, const char*, int, const char*, PyObject*) \
148150
BUILTIN(PyEval_GetBuiltins, PyObject*) \
149151
BUILTIN(PyEval_RestoreThread, void, PyThreadState*) \
150152
BUILTIN(PyEval_SaveThread, PyThreadState*) \
153+
BUILTIN(PyException_GetCause, PyObject*, PyObject*) \
151154
BUILTIN(PyException_GetContext, PyObject*, PyObject*) \
152155
BUILTIN(PyException_SetCause, void, PyObject*, PyObject*) \
153156
BUILTIN(PyException_SetContext, void, PyObject*, PyObject*) \
@@ -243,15 +246,19 @@ typedef struct {
243246
BUILTIN(PySequence_Check, int, PyObject*) \
244247
BUILTIN(PySequence_Concat, PyObject*, PyObject*, PyObject*) \
245248
BUILTIN(PySequence_Contains, int, PyObject*, PyObject*) \
249+
BUILTIN(PySequence_Count, Py_ssize_t, PyObject*, PyObject*) \
246250
BUILTIN(PySequence_DelItem, int, PyObject*, Py_ssize_t) \
251+
BUILTIN(PySequence_DelSlice, int, PyObject*, Py_ssize_t, Py_ssize_t) \
247252
BUILTIN(PySequence_GetItem, PyObject*, PyObject*, Py_ssize_t) \
248253
BUILTIN(PySequence_GetSlice, PyObject*, PyObject*, Py_ssize_t, Py_ssize_t) \
249254
BUILTIN(PySequence_InPlaceConcat, PyObject*, PyObject*, PyObject*) \
250255
BUILTIN(PySequence_InPlaceRepeat, PyObject*, PyObject*, Py_ssize_t) \
256+
BUILTIN(PySequence_Index, Py_ssize_t, PyObject*, PyObject*) \
251257
BUILTIN(PySequence_Length, Py_ssize_t, PyObject*) \
252258
BUILTIN(PySequence_List, PyObject*, PyObject*) \
253259
BUILTIN(PySequence_Repeat, PyObject*, PyObject*, Py_ssize_t) \
254260
BUILTIN(PySequence_SetItem, int, PyObject*, Py_ssize_t, PyObject*) \
261+
BUILTIN(PySequence_SetSlice, int, PyObject*, Py_ssize_t, Py_ssize_t, PyObject*) \
255262
BUILTIN(PySequence_Size, Py_ssize_t, PyObject*) \
256263
BUILTIN(PySequence_Tuple, PyObject*, PyObject*) \
257264
BUILTIN(PySet_Add, int, PyObject*, PyObject*) \
@@ -374,6 +381,7 @@ typedef struct {
374381
BUILTIN(PyTuple_SetItem, int, PyObject*, Py_ssize_t, PyObject*) \
375382
BUILTIN(PyTuple_Size, Py_ssize_t, PyObject*) \
376383
BUILTIN(PyType_IsSubtype, int, PyTypeObject*, PyTypeObject*) \
384+
BUILTIN(PyUnicodeDecodeError_Create, PyObject*, const char*, const char*, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char*) \
377385
BUILTIN(PyUnicode_AsEncodedString, PyObject*, PyObject*, const char*, const char*) \
378386
BUILTIN(PyUnicode_AsUnicodeEscapeString, PyObject*, PyObject*) \
379387
BUILTIN(PyUnicode_Compare, int, PyObject*, PyObject*) \
@@ -396,6 +404,7 @@ typedef struct {
396404
BUILTIN(PyWeakref_GetObject, PyObject*, PyObject*) \
397405
BUILTIN(PyWeakref_NewRef, PyObject*, PyObject*, PyObject*) \
398406
BUILTIN(Py_AtExit, int, void (*)(void)) \
407+
BUILTIN(Py_CompileString, PyObject*, const char*, const char*, int) \
399408
BUILTIN(Py_EnterRecursiveCall, int, const char*) \
400409
BUILTIN(Py_GenericAlias, PyObject*, PyObject*, PyObject*) \
401410
BUILTIN(Py_LeaveRecursiveCall, void) \

graalpython/com.oracle.graal.python.cext/src/exceptions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ PyObject * PyExc_FutureWarning = NULL;
112112
PyObject * PyExc_ImportWarning = NULL;
113113
PyObject * PyExc_UnicodeWarning = NULL;
114114
PyObject * PyExc_BytesWarning = NULL;
115+
PyObject * PyExc_EncodingWarning = NULL;
115116
PyObject * PyExc_ResourceWarning = NULL;
116117

117118
void initialize_exceptions() {
@@ -182,6 +183,7 @@ void initialize_exceptions() {
182183
PyExc_ImportWarning = PY_EXCEPTION("ImportWarning");
183184
PyExc_UnicodeWarning = PY_EXCEPTION("UnicodeWarning");
184185
PyExc_BytesWarning = PY_EXCEPTION("BytesWarning");
186+
PyExc_EncodingWarning = PY_EXCEPTION("EncodingWarning");
185187
PyExc_ResourceWarning = PY_EXCEPTION("ResourceWarning");
186188
}
187189

graalpython/com.oracle.graal.python.jni/src/capi_forwards.h

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,9 +1723,6 @@ PyAPI_FUNC(Py_ssize_t) PyBuffer_SizeFromFormat(const char* a) {
17231723
PyAPI_FUNC(int) PyBuffer_ToContiguous(void* a, Py_buffer* b, Py_ssize_t c, char d) {
17241724
unimplemented("PyBuffer_ToContiguous"); exit(-1);
17251725
}
1726-
PyAPI_FUNC(char*) PyByteArray_AsString(PyObject* a) {
1727-
unimplemented("PyByteArray_AsString"); exit(-1);
1728-
}
17291726
PyAPI_FUNC(PyObject*) PyByteArray_Concat(PyObject* a, PyObject* b) {
17301727
unimplemented("PyByteArray_Concat"); exit(-1);
17311728
}
@@ -1741,9 +1738,6 @@ PyAPI_FUNC(int) PyByteArray_Resize(PyObject* a, Py_ssize_t b) {
17411738
int result = (int) GraalPyByteArray_Resize(a, b);
17421739
return result;
17431740
}
1744-
PyAPI_FUNC(Py_ssize_t) PyByteArray_Size(PyObject* a) {
1745-
unimplemented("PyByteArray_Size"); exit(-1);
1746-
}
17471741
char* (*__target__PyBytes_AsString)(PyObject*) = NULL;
17481742
PyAPI_FUNC(char*) PyBytes_AsString(PyObject* a) {
17491743
char* result = (char*) __target__PyBytes_AsString(a);
@@ -2112,7 +2106,8 @@ PyAPI_FUNC(PyObject*) PyDict_GetItemWithError(PyObject* a, PyObject* b) {
21122106
return result;
21132107
}
21142108
PyAPI_FUNC(PyObject*) PyDict_Items(PyObject* a) {
2115-
unimplemented("PyDict_Items"); exit(-1);
2109+
PyObject* result = (PyObject*) GraalPyDict_Items(a);
2110+
return result;
21162111
}
21172112
PyAPI_FUNC(PyObject*) PyDict_Keys(PyObject* a) {
21182113
PyObject* result = (PyObject*) GraalPyDict_Keys(a);
@@ -2290,8 +2285,10 @@ PyAPI_FUNC(void) PyErr_SyntaxLocationEx(const char* a, int b, int c) {
22902285
PyAPI_FUNC(void) PyErr_SyntaxLocationObject(PyObject* a, int b, int c) {
22912286
unimplemented("PyErr_SyntaxLocationObject"); exit(-1);
22922287
}
2288+
int (*__target__PyErr_WarnExplicit)(PyObject*, const char*, const char*, int, const char*, PyObject*) = NULL;
22932289
PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject* a, const char* b, const char* c, int d, const char* e, PyObject* f) {
2294-
unimplemented("PyErr_WarnExplicit"); exit(-1);
2290+
int result = (int) __target__PyErr_WarnExplicit(a, b, c, d, e, f);
2291+
return result;
22952292
}
22962293
PyAPI_FUNC(int) PyErr_WarnExplicitFormat(PyObject* a, const char* b, int c, const char* d, PyObject* e, const char* f, ...) {
22972294
unimplemented("PyErr_WarnExplicitFormat"); exit(-1);
@@ -2392,7 +2389,8 @@ PyAPI_FUNC(const char*) PyExceptionClass_Name(PyObject* a) {
23922389
unimplemented("PyExceptionClass_Name"); exit(-1);
23932390
}
23942391
PyAPI_FUNC(PyObject*) PyException_GetCause(PyObject* a) {
2395-
unimplemented("PyException_GetCause"); exit(-1);
2392+
PyObject* result = (PyObject*) GraalPyException_GetCause(a);
2393+
return result;
23962394
}
23972395
PyAPI_FUNC(PyObject*) PyException_GetContext(PyObject* a) {
23982396
PyObject* result = (PyObject*) GraalPyException_GetContext(a);
@@ -3533,14 +3531,16 @@ PyAPI_FUNC(int) PySequence_Contains(PyObject* a, PyObject* b) {
35333531
return result;
35343532
}
35353533
PyAPI_FUNC(Py_ssize_t) PySequence_Count(PyObject* a, PyObject* b) {
3536-
unimplemented("PySequence_Count"); exit(-1);
3534+
Py_ssize_t result = (Py_ssize_t) GraalPySequence_Count(a, b);
3535+
return result;
35373536
}
35383537
PyAPI_FUNC(int) PySequence_DelItem(PyObject* a, Py_ssize_t b) {
35393538
int result = (int) GraalPySequence_DelItem(a, b);
35403539
return result;
35413540
}
35423541
PyAPI_FUNC(int) PySequence_DelSlice(PyObject* a, Py_ssize_t b, Py_ssize_t c) {
3543-
unimplemented("PySequence_DelSlice"); exit(-1);
3542+
int result = (int) GraalPySequence_DelSlice(a, b, c);
3543+
return result;
35443544
}
35453545
PyObject* (*__target__PySequence_Fast)(PyObject*, const char*) = NULL;
35463546
PyAPI_FUNC(PyObject*) PySequence_Fast(PyObject* a, const char* b) {
@@ -3567,7 +3567,8 @@ PyAPI_FUNC(PyObject*) PySequence_InPlaceRepeat(PyObject* a, Py_ssize_t b) {
35673567
return result;
35683568
}
35693569
PyAPI_FUNC(Py_ssize_t) PySequence_Index(PyObject* a, PyObject* b) {
3570-
unimplemented("PySequence_Index"); exit(-1);
3570+
Py_ssize_t result = (Py_ssize_t) GraalPySequence_Index(a, b);
3571+
return result;
35713572
}
35723573
PyAPI_FUNC(Py_ssize_t) PySequence_Length(PyObject* a) {
35733574
Py_ssize_t result = (Py_ssize_t) GraalPySequence_Length(a);
@@ -3586,7 +3587,8 @@ PyAPI_FUNC(int) PySequence_SetItem(PyObject* a, Py_ssize_t b, PyObject* c) {
35863587
return result;
35873588
}
35883589
PyAPI_FUNC(int) PySequence_SetSlice(PyObject* a, Py_ssize_t b, Py_ssize_t c, PyObject* d) {
3589-
unimplemented("PySequence_SetSlice"); exit(-1);
3590+
int result = (int) GraalPySequence_SetSlice(a, b, c, d);
3591+
return result;
35903592
}
35913593
PyAPI_FUNC(Py_ssize_t) PySequence_Size(PyObject* a) {
35923594
Py_ssize_t result = (Py_ssize_t) GraalPySequence_Size(a);
@@ -4037,8 +4039,10 @@ PyAPI_FUNC(int) PyType_Ready(PyTypeObject* a) {
40374039
int result = (int) __target__PyType_Ready(a);
40384040
return result;
40394041
}
4042+
PyObject* (*__target__PyUnicodeDecodeError_Create)(const char*, const char*, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char*) = NULL;
40404043
PyAPI_FUNC(PyObject*) PyUnicodeDecodeError_Create(const char* a, const char* b, Py_ssize_t c, Py_ssize_t d, Py_ssize_t e, const char* f) {
4041-
unimplemented("PyUnicodeDecodeError_Create"); exit(-1);
4044+
PyObject* result = (PyObject*) __target__PyUnicodeDecodeError_Create(a, b, c, d, e, f);
4045+
return result;
40424046
}
40434047
PyAPI_FUNC(PyObject*) PyUnicodeDecodeError_GetEncoding(PyObject* a) {
40444048
unimplemented("PyUnicodeDecodeError_GetEncoding"); exit(-1);
@@ -4528,8 +4532,10 @@ PyAPI_FUNC(int) Py_AtExit(void (*a)(void)) {
45284532
PyAPI_FUNC(int) Py_BytesMain(int a, char** b) {
45294533
unimplemented("Py_BytesMain"); exit(-1);
45304534
}
4535+
PyObject* (*__target__Py_CompileString)(const char*, const char*, int) = NULL;
45314536
PyAPI_FUNC(PyObject*) Py_CompileString(const char* a, const char* b, int c) {
4532-
unimplemented("Py_CompileString"); exit(-1);
4537+
PyObject* result = (PyObject*) __target__Py_CompileString(a, b, c);
4538+
return result;
45334539
}
45344540
PyAPI_FUNC(PyObject*) Py_CompileStringExFlags(const char* a, const char* b, int c, PyCompilerFlags* d, int e) {
45354541
unimplemented("Py_CompileStringExFlags"); exit(-1);
@@ -6248,6 +6254,7 @@ void initializeCAPIForwards(void* (*getAPI)(const char*)) {
62486254
__target__PyErr_SetNone = getAPI("PyErr_SetNone");
62496255
__target__PyErr_SetObject = getAPI("PyErr_SetObject");
62506256
__target__PyErr_SetString = getAPI("PyErr_SetString");
6257+
__target__PyErr_WarnExplicit = getAPI("PyErr_WarnExplicit");
62516258
__target__PyErr_WriteUnraisable = getAPI("PyErr_WriteUnraisable");
62526259
__target__PyEval_CallObjectWithKeywords = getAPI("PyEval_CallObjectWithKeywords");
62536260
__target__PyEval_EvalCode = getAPI("PyEval_EvalCode");
@@ -6372,6 +6379,7 @@ void initializeCAPIForwards(void* (*getAPI)(const char*)) {
63726379
__target__PyType_GetSlot = getAPI("PyType_GetSlot");
63736380
__target__PyType_Modified = getAPI("PyType_Modified");
63746381
__target__PyType_Ready = getAPI("PyType_Ready");
6382+
__target__PyUnicodeDecodeError_Create = getAPI("PyUnicodeDecodeError_Create");
63756383
__target__PyUnicode_Append = getAPI("PyUnicode_Append");
63766384
__target__PyUnicode_AppendAndDel = getAPI("PyUnicode_AppendAndDel");
63776385
__target__PyUnicode_AsASCIIString = getAPI("PyUnicode_AsASCIIString");
@@ -6406,6 +6414,7 @@ void initializeCAPIForwards(void* (*getAPI)(const char*)) {
64066414
__target__PyUnicode_InternInPlace = getAPI("PyUnicode_InternInPlace");
64076415
__target__PyUnicode_New = getAPI("PyUnicode_New");
64086416
__target__PyVectorcall_Call = getAPI("PyVectorcall_Call");
6417+
__target__Py_CompileString = getAPI("Py_CompileString");
64096418
__target__Py_GetBuildInfo = getAPI("Py_GetBuildInfo");
64106419
__target__Py_GetCompiler = getAPI("Py_GetCompiler");
64116420
__target__Py_GetVersion = getAPI("Py_GetVersion");

0 commit comments

Comments
 (0)