| 1 |
#ifndef LIBRT_INTERNAL_H |
| 2 |
#define LIBRT_INTERNAL_H |
| 3 |
|
| 4 |
#include <Python.h> |
| 5 |
#include <stdbool.h> |
| 6 |
|
| 7 |
// ABI version -- only an exact match is compatible. This will only be changed in |
| 8 |
// very exceptional cases (likely never) due to strict backward compatibility |
| 9 |
// requirements. |
| 10 |
#define LIBRT_INTERNAL_ABI_VERSION 2 |
| 11 |
|
| 12 |
// API version -- more recent versions must maintain backward compatibility, i.e. |
| 13 |
// we can add new features but not remove or change existing features (unless |
| 14 |
// ABI version is changed, but see the comment above). |
| 15 |
#define LIBRT_INTERNAL_API_VERSION 1 |
| 16 |
|
| 17 |
// Number of functions in the capsule API. If you add a new function, also increase |
| 18 |
// LIBRT_INTERNAL_API_VERSION. |
| 19 |
#define LIBRT_INTERNAL_API_LEN 21 |
| 20 |
|
| 21 |
#ifdef LIBRT_INTERNAL_MODULE |
| 22 |
|
| 23 |
static PyObject *ReadBuffer_internal(PyObject *source); |
| 24 |
static PyObject *WriteBuffer_internal(void); |
| 25 |
static PyObject *WriteBuffer_getvalue_internal(PyObject *self); |
| 26 |
static PyObject *ReadBuffer_internal(PyObject *source); |
| 27 |
static PyObject *ReadBuffer_internal_empty(void); |
| 28 |
static char write_bool_internal(PyObject *data, char value); |
| 29 |
static char read_bool_internal(PyObject *data); |
| 30 |
static char write_str_internal(PyObject *data, PyObject *value); |
| 31 |
static PyObject *read_str_internal(PyObject *data); |
| 32 |
static char write_float_internal(PyObject *data, double value); |
| 33 |
static double read_float_internal(PyObject *data); |
| 34 |
static char write_int_internal(PyObject *data, CPyTagged value); |
| 35 |
static CPyTagged read_int_internal(PyObject *data); |
| 36 |
static char write_tag_internal(PyObject *data, uint8_t value); |
| 37 |
static uint8_t read_tag_internal(PyObject *data); |
| 38 |
static int NativeInternal_ABI_Version(void); |
| 39 |
static char write_bytes_internal(PyObject *data, PyObject *value); |
| 40 |
static PyObject *read_bytes_internal(PyObject *data); |
| 41 |
static uint8_t cache_version_internal(void); |
| 42 |
static PyTypeObject *ReadBuffer_type_internal(void); |
| 43 |
static PyTypeObject *WriteBuffer_type_internal(void); |
| 44 |
static int NativeInternal_API_Version(void); |
| 45 |
static PyObject *extract_symbol_internal(PyObject *data); |
| 46 |
|
| 47 |
#endif |
| 48 |
|
| 49 |
#endif // LIBRT_INTERNAL_H |