PythonMonkey v1.1.1 (dev)
|
Python's C APIs are constantly changing in different versions of CPython. PythonMonkey has a wide variety of CPython versions' support. (Currently Python 3.8-3.13) This file helps our Python API calls work with different Python versions in the same code base. More...
#include <Python.h>
Go to the source code of this file.
Macros | |
#define | Py_IsFinalizing _Py_IsFinalizing |
_Py_IsFinalizing becomes a stable API in Python 3.13, and renames to Py_IsFinalizing | |
#define | Py_SET_SIZE(ob, size) _Py_SET_SIZE((PyVarObject *)(ob), size) |
Functions | |
PyObject * | PyDictView_New (PyObject *dict, PyTypeObject *type) |
_PyDictViewObject type definition moved from Python's public API to the internal header file internal/pycore_dict.h in Python 3.13. | |
void | PyErr_SetKeyError (PyObject *key) |
Shim for _PyErr_SetKeyError . Since Python 3.13, _PyErr_SetKeyError function became an internal API. | |
PyObject * | PyObject_CallOneArg (PyObject *func, PyObject *arg) |
Shim for PyObject_CallOneArg . PyObject_CallOneArg is not available in Python < 3.9. | |
int | PyLong_AsByteArray (PyLongObject *v, unsigned char *bytes, size_t n, bool little_endian, bool is_signed) |
Shim for _PyLong_AsByteArray . Python 3.13.0a4 added a new public API PyLong_AsNativeBytes() to replace the private _PyLong_AsByteArray() . But this change also modified the function signature of _PyLong_AsByteArray() . | |
Python's C APIs are constantly changing in different versions of CPython. PythonMonkey has a wide variety of CPython versions' support. (Currently Python 3.8-3.13) This file helps our Python API calls work with different Python versions in the same code base.
#define Py_IsFinalizing _Py_IsFinalizing |
_Py_IsFinalizing
becomes a stable API in Python 3.13, and renames to Py_IsFinalizing
#define Py_SET_SIZE | ( | ob, | |
size | |||
) | _Py_SET_SIZE((PyVarObject *)(ob), size) |
PyObject * PyDictView_New | ( | PyObject * | dict, |
PyTypeObject * | type | ||
) |
_PyDictViewObject
type definition moved from Python's public API to the internal header file internal/pycore_dict.h
in Python 3.13.
Shim for _PyArg_CheckPositional
. Since Python 3.13, _PyArg_CheckPositional
function became an internal API.
Shim for _PyDictView_New
. Since Python 3.13, _PyDictView_New
function became an internal API.
void PyErr_SetKeyError | ( | PyObject * | key | ) |
Shim for _PyErr_SetKeyError
. Since Python 3.13, _PyErr_SetKeyError
function became an internal API.
int PyLong_AsByteArray | ( | PyLongObject * | v, |
unsigned char * | bytes, | ||
size_t | n, | ||
bool | little_endian, | ||
bool | is_signed | ||
) |
Shim for _PyLong_AsByteArray
. Python 3.13.0a4 added a new public API PyLong_AsNativeBytes()
to replace the private _PyLong_AsByteArray()
. But this change also modified the function signature of _PyLong_AsByteArray()
.
PyObject * PyObject_CallOneArg | ( | PyObject * | func, |
PyObject * | arg | ||
) |
Shim for PyObject_CallOneArg
. PyObject_CallOneArg
is not available in Python < 3.9.