Browse Source

Merge ctypes emulation symbols from libpython into library/cpp/symbols/python

`PyCapsule_*` symbols belong to `libpython.so`, there is no need to generate separate module for them.

```
$ nm --dynamic /usr/lib/x86_64-linux-gnu/libpython3.11.so.1.0 | grep PyCapsule
0000000000386550 T PyCapsule_GetContext
00000000003865a0 T PyCapsule_GetDestructor
00000000003865f0 T PyCapsule_GetName
0000000000386640 T PyCapsule_GetPointer
000000000038d540 T PyCapsule_Import
0000000000384bc0 T PyCapsule_IsValid
000000000038d6b0 T PyCapsule_New
00000000003863f0 T PyCapsule_SetContext
0000000000386440 T PyCapsule_SetDestructor
0000000000386490 T PyCapsule_SetName
00000000003864e0 T PyCapsule_SetPointer
000000000065cbc0 D PyCapsule_Type
```
commit_hash:58f102ca48732d8597382415a86554a7ef5f0458
thegeorg 4 days ago
parent
commit
535218a30e
1 changed files with 22 additions and 2 deletions
  1. 22 2
      library/python/symbols/python/syms.cpp

+ 22 - 2
library/python/symbols/python/syms.cpp

@@ -1,7 +1,17 @@
 #define SYM(SYM_NAME) extern "C" void SYM_NAME();
-SYM(PyObject_GetBuffer)
 SYM(PyBuffer_Release)
+SYM(PyCapsule_GetContext)
+SYM(PyCapsule_GetDestructor)
+SYM(PyCapsule_GetName)
+SYM(PyCapsule_GetPointer)
+SYM(PyCapsule_IsValid)
+SYM(PyCapsule_New)
+SYM(PyCapsule_SetContext)
+SYM(PyCapsule_SetDestructor)
+SYM(PyCapsule_SetName)
+SYM(PyCapsule_SetPointer)
 SYM(PyCell_New)
+SYM(PyObject_GetBuffer)
 SYM(Py_DecRef)
 SYM(Py_IncRef)
 #undef SYM
@@ -9,9 +19,19 @@ SYM(Py_IncRef)
 #include <library/python/symbols/registry/syms.h>
 
 BEGIN_SYMS("python")
-SYM(PyObject_GetBuffer)
 SYM(PyBuffer_Release)
+SYM(PyCapsule_GetContext)
+SYM(PyCapsule_GetDestructor)
+SYM(PyCapsule_GetName)
+SYM(PyCapsule_GetPointer)
+SYM(PyCapsule_IsValid)
+SYM(PyCapsule_New)
+SYM(PyCapsule_SetContext)
+SYM(PyCapsule_SetDestructor)
+SYM(PyCapsule_SetName)
+SYM(PyCapsule_SetPointer)
 SYM(PyCell_New)
+SYM(PyObject_GetBuffer)
 SYM(Py_DecRef)
 SYM(Py_IncRef)
 END_SYMS()