Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/python-wasm
Path: blob/main/core/dylink/test/python-extension/app.h
1393 views
1
#define EXPORTED_SYMBOL __attribute__((visibility("default")))
2
#define FUNCPTR(x) __attribute__((visibility("default"))) void* __FUNCPTR__##x() { return &(x);}
3
4
struct PyObjectX {
5
int thingy;
6
};
7
8
typedef struct PyObjectX PyObject;
9
10
extern
11
PyObject _Py_NoneStruct;
12
13
#define PyNone (&_Py_NoneStruct)
14
15
typedef int (*FUN_PTR)(int);
16
17
typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
18
19
20
struct PyMethodDef {
21
char *name;
22
PyCFunction f;
23
};
24
25
struct PyModuleDef {
26
char *m_name;
27
struct PyMethodDef* m_methods;
28
};
29
30
extern int PyModuleDef_Init(struct PyModuleDef* module);
31
32
33
34