|
|
void | ast::pythonproto::Py_Initialize (void) |
| |
|
int | ast::pythonproto::Py_FinalizeEx (void) |
| |
|
int | ast::pythonproto::Py_IsInitialized (void) |
| |
|
int | ast::pythonproto::PyRun_SimpleString (const char *command) |
| |
|
PyObject * | ast::pythonproto::PyImport_ImportModule (const char *name) |
| |
|
PyObject * | ast::pythonproto::PyObject_GetAttrString (PyObject *o, const char *attr_name) |
| |
|
PyObject * | ast::pythonproto::PyObject_CallObject (PyObject *callable, PyObject *args) |
| |
|
void | ast::pythonproto::Py_DecRef (PyObject *o) |
| |
|
void | ast::pythonproto::Py_IncRef (PyObject *o) |
| |
|
void | ast::pythonproto::PyErr_Print (void) |
| |
|
PyObject * | ast::pythonproto::PyErr_Occurred (void) |
| |
|
const char * | ast::pythonproto::PyUnicode_AsUTF8 (PyObject *unicode) |
| |
|
PyObject * | ast::pythonproto::PyRun_String (const char *str, int start, PyObject *globals, PyObject *locals) |
| |
|
long | ast::pythonproto::PyLong_AsLong (PyObject *o) |
| |
|
double | ast::pythonproto::PyFloat_AsDouble (PyObject *o) |
| |
|
PyObject * | ast::pythonproto::PyLong_FromLong (long v) |
| |
|
PyObject * | ast::pythonproto::PyFloat_FromDouble (double v) |
| |
|
PyObject * | ast::pythonproto::PyUnicode_FromString (const char *u) |
| |
|
PyObject * | ast::pythonproto::PyBool_FromLong (long v) |
| |
|
PyObject * | ast::pythonproto::PyDict_New (void) |
| |
|
int | ast::pythonproto::PyDict_SetItemString (PyObject *dict, const char *key, PyObject *val) |
| |
|
PyObject * | ast::pythonproto::PyDict_GetItemString (PyObject *dict, const char *key) |
| |
|
int | ast::pythonproto::PyGILState_Ensure (void) |
| |
|
void | ast::pythonproto::PyGILState_Release (int gstate) |
| |
|
int | ast::pythonproto::PyObject_SetAttrString (PyObject *o, const char *attr_name, PyObject *v) |
| |
|
int | ast::pythonproto::PyObject_IsInstance (PyObject *obj, PyObject *cls) |
| |
|
void | ast::pythonproto::PyErr_Fetch (PyObject **ptype, PyObject **pvalue, PyObject **ptraceback) |
| |
|
PyObject * | ast::pythonproto::PyObject_Str (PyObject *o) |
| |
Python C API 动态加载封装实现
参考 SpiceAPI 模式,动态加载 Python 共享库
- 作者
- axel
- 日期
- 2026-05-16
- 版权所有
- 版权所有 (C) 2026-present, SpaceAST项目.
SpaceAST项目(https://github.com/space-ast/ast) 本软件基于 Apache 2.0 开源许可证分发。 您可在遵守许可证条款的前提下使用、修改和分发本软件。 许可证全文请见:
http://www.apache.org/licenses/LICENSE-2.0
重要须知: 软件按"现有状态"提供,无任何明示或暗示的担保条件。 除非法律要求或书面同意,作者与贡献者不承担任何责任。 使用本软件所产生的风险,需由您自行承担。