Skip to content

Commit

Permalink
Merge pull request #5 from MatrixEditor/dev/capi-primitives
Browse files Browse the repository at this point in the history
[DEV] CAPI Fixed installation candidate
  • Loading branch information
MatrixEditor authored Jul 19, 2024
2 parents b6f5db2 da55095 commit 0483e97
Show file tree
Hide file tree
Showing 13 changed files with 168 additions and 107 deletions.
2 changes: 1 addition & 1 deletion docs/sphinx/source/reference/capi/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 46,7 @@ configuration:
set(CP_INCLUDE_DIR "...")
# or
execute_process(
COMMAND "${Python_EXECUTABLE}" -m caterpillar --cmake_dir
COMMAND "${Python_EXECUTABLE}" -m caterpillar --include-dir
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE CP_INCLUDE_DIR
)
Expand Down
4 changes: 2 additions & 2 deletions examples/c_extension/src/_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 2,9 @@
#undef _CPMODULE
#endif

#include "caterpillar/atomobj.h" /* atom struct */
#include "caterpillar/caterpillar.h" /* global types and API */
#include "caterpillar/atomobj.h" /* atom struct */
#include "caterpillar/module.h" /* module macros */
#include "caterpillar/module.h" /* module macros */

/* example C atom*/
typedef struct _ExampleCAtom
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 9,7 @@ wheel.py-api = "cp312"

[project]
name = "caterpillar"
version = "2.1.0"
version = "2.1.1"

description="Library to pack and unpack structurized binary data."
authors = [
Expand Down
11 changes: 10 additions & 1 deletion src/caterpillar.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 100,15 @@ void *Cp_API[] = {
(void *) &CpState_SetGlobals,
(void *) &CpLayer_New,
(void *) &CpLayer_Invalidate,
(void *) &CpLayer_SetSequence
(void *) &CpLayer_SetSequence,
(void *) &CpStructFieldInfo_New,
(void *) &CpStruct_AddFieldInfo,
(void *) &CpStruct_AddField,
(void *) &CpStruct_New,
(void *) &CpStruct_GetAnnotations,
(void *) &CpStruct_ReplaceType,
(void *) &CpStruct_HasOption,
(void *) &CpStructModel_Check,
(void *) &CpStructModel_GetStruct
};

2 changes: 1 addition & 1 deletion src/caterpillar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

__version__ = "2.1.0"
__version__ = "2.1.1"
__release__ = None
__author__ = "MatrixEditor"

Expand Down
2 changes: 1 addition & 1 deletion src/caterpillar/include/caterpillar/atoms/primitive.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 34,7 @@ struct _boolatomobj
///
/// This variable defines the type object for bool atom objects, allowing
/// them to be used across the library.
PyAPI_DATA(PyTypeObject) CpBoolAtom_Type;
// PyAPI_DATA(PyTypeObject) CpBoolAtom_Type;

/**
* @brief Checks if the given object is a bool atom object.
Expand Down
164 changes: 91 additions & 73 deletions src/caterpillar/include/caterpillar/caterpillar.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,79 80,88 @@ Here, all publicly exposed types and functions are defined. These declarations
are then used and implemented in the internal API.
*/

PyAPI_DATA(PyModuleDef) CpModule;
PyAPI_DATA(PyTypeObject) CpCAtom_Type;
PyAPI_DATA(PyTypeObject) CpArch_Type;
PyAPI_DATA(PyTypeObject) CpEndian_Type;
PyAPI_DATA(PyTypeObject) CpContext_Type;
PyAPI_DATA(PyTypeObject) CpUnaryExpr_Type;
PyAPI_DATA(PyTypeObject) CpBinaryExpr_Type;
PyAPI_DATA(PyTypeObject) CpContextPath_Type;
PyAPI_DATA(PyTypeObject) CpField_Type;
PyAPI_DATA(PyTypeObject) CpFieldAtom_Type;
PyAPI_DATA(PyTypeObject) CpFieldCAtom_Type;
PyAPI_DATA(PyTypeObject) CpInvalidDefault_Type;
PyAPI_DATA(PyTypeObject) CpDefaultOption_Type;
PyAPI_DATA(PyObject) _CpInvalidDefault_Object;
PyAPI_DATA(PyObject) _CpDefaultOption_Object;
PyAPI_DATA(PyTypeObject) CpAtom_Type;
PyAPI_DATA(PyTypeObject) CpOption_Type;
PyAPI_DATA(PyTypeObject) CpState_Type;
PyAPI_DATA(PyTypeObject) CpLayer_Type;
PyAPI_DATA(PyTypeObject) CpStructFieldInfo_Type;
PyAPI_DATA(PyTypeObject) CpStruct_Type;
PyAPI_DATA(PyTypeObject) CpFloatAtom_Type;
PyAPI_DATA(PyTypeObject) CpIntAtom_Type;
PyAPI_DATA(PyTypeObject) CpBoolAtom_Type;
PyAPI_DATA(PyTypeObject) CpCharAtom_Type;
PyAPI_DATA(PyTypeObject) CpPaddingAtom_Type;
PyAPI_DATA(PyTypeObject) CpStringAtom_Type;
PyAPI_FUNC(int) CpEndian_IsLittleEndian(CpEndianObject* endian, _modulestate* mod);
PyAPI_FUNC(CpContextObject*) CpContext_New(void);
PyAPI_FUNC(CpUnaryExprObject*) CpUnaryExpr_New(int op, PyObject* value);
PyAPI_FUNC(CpBinaryExprObject*) CpBinaryExpr_New(int op, PyObject* left, PyObject* right);
PyAPI_FUNC(CpContextPathObject*) CpContextPath_New(PyObject* path);
PyAPI_FUNC(CpContextPathObject*) CpContextPath_FromString(const char* path);
PyAPI_FUNC(CpFieldObject*) CpField_New(PyObject* atom);
PyAPI_FUNC(int) CpField_HasCondition(CpFieldObject* self);
PyAPI_FUNC(int) CpField_IsEnabled(CpFieldObject* self, PyObject* context);
PyAPI_FUNC(Py_ssize_t) CpField_GetOffset(CpFieldObject* self, PyObject* context);
PyAPI_FUNC(PyObject*) CpField_EvalSwitch(CpFieldObject* self, PyObject* op, PyObject* context);
PyAPI_FUNC(PyObject*) CpField_GetLength(CpFieldObject* self, PyObject* context);
PyAPI_FUNC(PyObject*) CpTypeOf(PyObject* op);
PyAPI_FUNC(PyObject*) CpTypeOf_Field(CpFieldObject* op);
PyAPI_FUNC(PyObject*) CpTypeOf_Common(PyObject* op);
PyAPI_FUNC(int) CpPack(PyObject* op, PyObject* atom, PyObject* io, PyObject* globals);
PyAPI_FUNC(int) CpPack_Field(PyObject* op, CpFieldObject* field, CpLayerObject* layer);
PyAPI_FUNC(int) CpPack_Common(PyObject* op, PyObject* atom, CpLayerObject* layer);
PyAPI_FUNC(int) CpPack_Struct(PyObject* op, CpStructObject* struct_, CpLayerObject* layer);
PyAPI_FUNC(int) _Cp_Pack(PyObject* op, PyObject* atom, CpLayerObject* layer);
PyAPI_FUNC(int) _CpPack_EvalLength(CpLayerObject* layer,PyObject* length,Py_ssize_t size,bool* greedy,Py_ssize_t* dstLength);
PyAPI_FUNC(PyObject*) CpSizeOf(PyObject* op, PyObject* globals);
PyAPI_FUNC(PyObject*) CpSizeOf_Field(CpFieldObject* field, CpLayerObject* layer);
PyAPI_FUNC(PyObject*) CpSizeOf_Struct(CpStructObject* struct_, CpLayerObject* layer);
PyAPI_FUNC(PyObject*) CpSizeOf_Common(PyObject* op, CpLayerObject* layer);
PyAPI_FUNC(PyObject*) _Cp_SizeOf(PyObject* op, CpLayerObject* layer);
PyAPI_FUNC(PyObject*) CpUnpack(PyObject* atom, PyObject* io, PyObject* globals);
PyAPI_FUNC(PyObject*) CpUnpack_Field(CpFieldObject* field, CpLayerObject* layer);
PyAPI_FUNC(PyObject*) CpUnpack_Common(PyObject* op, CpLayerObject* layer);
PyAPI_FUNC(PyObject*) CpUnpack_Struct(CpStructObject* struct_, CpLayerObject* layer);
PyAPI_FUNC(PyObject*) _Cp_Unpack(PyObject* atom, CpLayerObject* layer);
PyAPI_FUNC(int) _CpUnpack_EvalLength(CpLayerObject* layer,PyObject* length,bool* seq_greedy,Py_ssize_t* seq_length);
PyAPI_FUNC(PyObject*) CpUnpack_CAtom(CpCAtomObject* catom, CpLayerObject* layer);
PyAPI_FUNC(int) CpPack_CAtom(PyObject* op, CpCAtomObject* catom, CpLayerObject* layer);
PyAPI_FUNC(PyObject*) CpSizeOf_CAtom(CpCAtomObject* catom, CpLayerObject* layer);
PyAPI_FUNC(PyObject *) CpTypeOf_CAtom(CpCAtomObject* op);
PyAPI_FUNC(CpStateObject*) CpState_New(PyObject* io);
PyAPI_FUNC(PyObject*) CpState_Tell(CpStateObject* self);
PyAPI_FUNC(PyObject*) CpState_Seek(CpStateObject* self, PyObject* offset, int whence);
PyAPI_FUNC(PyObject*) CpState_Read(CpStateObject* self, Py_ssize_t size);
PyAPI_FUNC(PyObject*) CpState_ReadFully(CpStateObject* self);
PyAPI_FUNC(PyObject*) CpState_Write(CpStateObject* self, PyObject* value);
PyAPI_FUNC(int) CpState_SetGlobals(CpStateObject* self, PyObject* globals);
PyAPI_FUNC(CpLayerObject*) CpLayer_New(CpStateObject* state, CpLayerObject* parent);
PyAPI_FUNC(int) CpLayer_Invalidate(CpLayerObject* self);
PyAPI_FUNC(int) CpLayer_SetSequence(CpLayerObject* self,PyObject* sequence,Py_ssize_t length,int8_t greedy);
extern PyModuleDef CpModule;
extern PyTypeObject CpCAtom_Type;
extern PyTypeObject CpArch_Type;
extern PyTypeObject CpEndian_Type;
extern PyTypeObject CpContext_Type;
extern PyTypeObject CpUnaryExpr_Type;
extern PyTypeObject CpBinaryExpr_Type;
extern PyTypeObject CpContextPath_Type;
extern PyTypeObject CpField_Type;
extern PyTypeObject CpFieldAtom_Type;
extern PyTypeObject CpFieldCAtom_Type;
extern PyTypeObject CpInvalidDefault_Type;
extern PyTypeObject CpDefaultOption_Type;
extern PyObject _CpInvalidDefault_Object;
extern PyObject _CpDefaultOption_Object;
extern PyTypeObject CpAtom_Type;
extern PyTypeObject CpOption_Type;
extern PyTypeObject CpState_Type;
extern PyTypeObject CpLayer_Type;
extern PyTypeObject CpStructFieldInfo_Type;
extern PyTypeObject CpStruct_Type;
extern PyTypeObject CpFloatAtom_Type;
extern PyTypeObject CpIntAtom_Type;
extern PyTypeObject CpBoolAtom_Type;
extern PyTypeObject CpCharAtom_Type;
extern PyTypeObject CpPaddingAtom_Type;
extern PyTypeObject CpStringAtom_Type;
int CpEndian_IsLittleEndian(CpEndianObject* endian, _modulestate* mod);
CpContextObject* CpContext_New(void);
CpUnaryExprObject* CpUnaryExpr_New(int op, PyObject* value);
CpBinaryExprObject* CpBinaryExpr_New(int op, PyObject* left, PyObject* right);
CpContextPathObject* CpContextPath_New(PyObject* path);
CpContextPathObject* CpContextPath_FromString(const char* path);
CpFieldObject* CpField_New(PyObject* atom);
int CpField_HasCondition(CpFieldObject* self);
int CpField_IsEnabled(CpFieldObject* self, PyObject* context);
Py_ssize_t CpField_GetOffset(CpFieldObject* self, PyObject* context);
PyObject* CpField_EvalSwitch(CpFieldObject* self, PyObject* op, PyObject* context);
PyObject* CpField_GetLength(CpFieldObject* self, PyObject* context);
PyObject* CpTypeOf(PyObject* op);
PyObject* CpTypeOf_Field(CpFieldObject* op);
PyObject* CpTypeOf_Common(PyObject* op);
int CpPack(PyObject* op, PyObject* atom, PyObject* io, PyObject* globals);
int CpPack_Field(PyObject* op, CpFieldObject* field, CpLayerObject* layer);
int CpPack_Common(PyObject* op, PyObject* atom, CpLayerObject* layer);
int CpPack_Struct(PyObject* op, CpStructObject* struct_, CpLayerObject* layer);
int _Cp_Pack(PyObject* op, PyObject* atom, CpLayerObject* layer);
int _CpPack_EvalLength(CpLayerObject* layer,PyObject* length,Py_ssize_t size,bool* greedy,Py_ssize_t* dstLength);
PyObject* CpSizeOf(PyObject* op, PyObject* globals);
PyObject* CpSizeOf_Field(CpFieldObject* field, CpLayerObject* layer);
PyObject* CpSizeOf_Struct(CpStructObject* struct_, CpLayerObject* layer);
PyObject* CpSizeOf_Common(PyObject* op, CpLayerObject* layer);
PyObject* _Cp_SizeOf(PyObject* op, CpLayerObject* layer);
PyObject* CpUnpack(PyObject* atom, PyObject* io, PyObject* globals);
PyObject* CpUnpack_Field(CpFieldObject* field, CpLayerObject* layer);
PyObject* CpUnpack_Common(PyObject* op, CpLayerObject* layer);
PyObject* CpUnpack_Struct(CpStructObject* struct_, CpLayerObject* layer);
PyObject* _Cp_Unpack(PyObject* atom, CpLayerObject* layer);
int _CpUnpack_EvalLength(CpLayerObject* layer,PyObject* length,bool* seq_greedy,Py_ssize_t* seq_length);
PyObject* CpUnpack_CAtom(CpCAtomObject* catom, CpLayerObject* layer);
int CpPack_CAtom(PyObject* op, CpCAtomObject* catom, CpLayerObject* layer);
PyObject* CpSizeOf_CAtom(CpCAtomObject* catom, CpLayerObject* layer);
PyObject * CpTypeOf_CAtom(CpCAtomObject* op);
CpStateObject* CpState_New(PyObject* io);
PyObject* CpState_Tell(CpStateObject* self);
PyObject* CpState_Seek(CpStateObject* self, PyObject* offset, int whence);
PyObject* CpState_Read(CpStateObject* self, Py_ssize_t size);
PyObject* CpState_ReadFully(CpStateObject* self);
PyObject* CpState_Write(CpStateObject* self, PyObject* value);
int CpState_SetGlobals(CpStateObject* self, PyObject* globals);
CpLayerObject* CpLayer_New(CpStateObject* state, CpLayerObject* parent);
int CpLayer_Invalidate(CpLayerObject* self);
int CpLayer_SetSequence(CpLayerObject* self,PyObject* sequence,Py_ssize_t length,int8_t greedy);
CpStructFieldInfoObject* CpStructFieldInfo_New(CpFieldObject* field);
int CpStruct_AddFieldInfo(CpStructObject* o, CpStructFieldInfoObject* info);
int CpStruct_AddField(CpStructObject* o, CpFieldObject* field, int exclude);
CpStructObject* CpStruct_New(PyObject* model);
PyObject* CpStruct_GetAnnotations(CpStructObject* o, int eval);
int CpStruct_ReplaceType(CpStructObject* o, PyObject* name, PyObject* type);
int CpStruct_HasOption(CpStructObject* o, PyObject* option);
int CpStructModel_Check(PyObject* model, _modulestate* state);
PyObject* CpStructModel_GetStruct(PyObject* model, _modulestate* state);

#else

Expand Down Expand Up @@ -235,6 244,15 @@ caterpillar_api.py
#define CpLayer_New (*((CpLayerObject* (*)(CpStateObject* state, CpLayerObject* parent)))Cp_API[95])
#define CpLayer_Invalidate (*((int (*)(CpLayerObject* self)))Cp_API[96])
#define CpLayer_SetSequence (*((int (*)(CpLayerObject* self,PyObject* sequence,Py_ssize_t length,int8_t greedy)))Cp_API[97])
#define CpStructFieldInfo_New (*((CpStructFieldInfoObject* (*)(CpFieldObject* field)))Cp_API[98])
#define CpStruct_AddFieldInfo (*((int (*)(CpStructObject* o, CpStructFieldInfoObject* info)))Cp_API[99])
#define CpStruct_AddField (*((int (*)(CpStructObject* o, CpFieldObject* field, int exclude)))Cp_API[100])
#define CpStruct_New (*((CpStructObject* (*)(PyObject* model)))Cp_API[101])
#define CpStruct_GetAnnotations (*((PyObject* (*)(CpStructObject* o, int eval)))Cp_API[102])
#define CpStruct_ReplaceType (*((int (*)(CpStructObject* o, PyObject* name, PyObject* type)))Cp_API[103])
#define CpStruct_HasOption (*((int (*)(CpStructObject* o, PyObject* option)))Cp_API[104])
#define CpStructModel_Check (*((int (*)(PyObject* model, _modulestate* state)))Cp_API[105])
#define CpStructModel_GetStruct (*((PyObject* (*)(PyObject* model, _modulestate* state)))Cp_API[106])

/**
* @brief Public C API for extension modules as reference table
Expand Down
18 changes: 9 additions & 9 deletions src/caterpillar/include/caterpillar/field.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 119,7 @@ struct _fieldobj
* @param atom the atom object
* @return the new field object
*/
PyAPI_FUNC(CpFieldObject*) CpField_New(PyObject* atom);
// PyAPI_FUNC(CpFieldObject*) CpField_New(PyObject* atom);

/**
* @brief Returns whether the field has a condition
Expand All @@ -129,7 129,7 @@ PyAPI_FUNC(CpFieldObject*) CpField_New(PyObject* atom);
* @param field the field object
* @return 1 if the field has a condition, 0 otherwise
*/
PyAPI_FUNC(int) CpField_HasCondition(CpFieldObject* field);
// PyAPI_FUNC(int) CpField_HasCondition(CpFieldObject* field);

/**
* @brief Returns whether the field is enabled
Expand All @@ -138,7 138,7 @@ PyAPI_FUNC(int) CpField_HasCondition(CpFieldObject* field);
* @param context the context object
* @return 1 if the field is enabled, 0 otherwise, or -1 on failure
*/
PyAPI_FUNC(int) CpField_IsEnabled(CpFieldObject* field, PyObject* context);
// PyAPI_FUNC(int) CpField_IsEnabled(CpFieldObject* field, PyObject* context);

/**
* @brief Returns the offset of the field
Expand All @@ -147,8 147,8 @@ PyAPI_FUNC(int) CpField_IsEnabled(CpFieldObject* field, PyObject* context);
* @param context the context object
* @return the offset of the field, or -1 on failure
*/
PyAPI_FUNC(Py_ssize_t)
CpField_GetOffset(CpFieldObject* field, PyObject* context);
// PyAPI_FUNC(Py_ssize_t)
// CpField_GetOffset(CpFieldObject* field, PyObject* context);

/**
* @brief Evaluates a switch statement (if any)
Expand All @@ -158,8 158,8 @@ PyAPI_FUNC(Py_ssize_t)
* @param context the context object
* @return the result of the switch statement, or NULL on failure
*/
PyAPI_FUNC(PyObject*)
CpField_EvalSwitch(CpFieldObject* field, PyObject* value, PyObject* context);
// PyAPI_FUNC(PyObject*)
// CpField_EvalSwitch(CpFieldObject* field, PyObject* value, PyObject* context);

/**
* @brief Returns the length of the field
Expand All @@ -168,8 168,8 @@ PyAPI_FUNC(PyObject*)
* @param context the context object
* @return the length of the field, or NULL on failure
*/
PyAPI_FUNC(PyObject*)
CpField_GetLength(CpFieldObject* field, PyObject* context);
// PyAPI_FUNC(PyObject*)
// CpField_GetLength(CpFieldObject* field, PyObject* context);

// -----------------------------------------------------------------------------
// field atom
Expand Down
26 changes: 13 additions & 13 deletions src/caterpillar/include/caterpillar/struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 71,8 @@ struct CpStructFieldInfo
* @param field the field object
* @return the new struct field info object
*/
PyAPI_FUNC(CpStructFieldInfoObject*)
CpStructFieldInfo_New(CpFieldObject* field);
// PyAPI_FUNC(CpStructFieldInfoObject*)
// CpStructFieldInfo_New(CpFieldObject* field);

//---------------------------------------------------------------------------
// struct
Expand Down Expand Up @@ -133,8 133,8 @@ struct _structobj
* @param field the field information
* @return 1 on success, 0 on failure
*/
PyAPI_FUNC(int)
CpStruct_AddFieldInfo(CpStructObject* self, CpStructFieldInfoObject* field);
// PyAPI_FUNC(int)
// CpStruct_AddFieldInfo(CpStructObject* self, CpStructFieldInfoObject* field);

/**
* @brief Add a field to the struct
Expand All @@ -144,16 144,16 @@ PyAPI_FUNC(int)
* @param exclude true if the field should be excluded
* @return 1 on success, 0 on failure
*/
PyAPI_FUNC(int)
CpStruct_AddField(CpStructObject* self, CpFieldObject* field, int exclude);
// PyAPI_FUNC(int)
// CpStruct_AddField(CpStructObject* self, CpFieldObject* field, int exclude);

/**
* @brief Create a new struct
*
* @param model the model object
* @return the new struct object, or NULL on failure
*/
PyAPI_FUNC(CpStructObject*) CpStruct_New(PyObject* model);
//PyAPI_FUNC(CpStructObject*) CpStruct_New(PyObject* model);

/**
* @brief Get the annotations of the struct's model
Expand All @@ -162,7 162,7 @@ PyAPI_FUNC(CpStructObject*) CpStruct_New(PyObject* model);
* @param eval true if the annotations should be evaluated
* @return the annotations, or NULL on failure
*/
PyAPI_FUNC(PyObject*) CpStruct_GetAnnotations(CpStructObject* op, int eval);
// PyAPI_FUNC(PyObject*) CpStruct_GetAnnotations(CpStructObject* op, int eval);

/**
* @brief Replace the annotation of the struct's model with the given value
Expand All @@ -172,8 172,8 @@ PyAPI_FUNC(PyObject*) CpStruct_GetAnnotations(CpStructObject* op, int eval);
* @param value the new value of the annotation
* @return 1 on success, 0 on failure
*/
PyAPI_FUNC(int)
CpStruct_ReplaceType(CpStructObject* op, PyObject* name, PyObject* value);
// PyAPI_FUNC(int)
// CpStruct_ReplaceType(CpStructObject* op, PyObject* name, PyObject* value);

/**
* @brief Checks if the given struct has a given option
Expand All @@ -182,7 182,7 @@ PyAPI_FUNC(int)
* @param option the option to check
* @return 1 if the object has the option, 0 otherwise
*/
PyAPI_FUNC(int) CpStruct_HasOption(CpStructObject* op, PyObject* option);
// PyAPI_FUNC(int) CpStruct_HasOption(CpStructObject* op, PyObject* option);

/**
* @brief Checks if the given model stores a struct
Expand All @@ -191,7 191,7 @@ PyAPI_FUNC(int) CpStruct_HasOption(CpStructObject* op, PyObject* option);
* @param m the module state, may be NULL
* @return 1 if the model stores a struct, 0 otherwise
*/
PyAPI_FUNC(int) CpStructModel_Check(PyObject* model, _modulestate* m);
// PyAPI_FUNC(int) CpStructModel_Check(PyObject* model, _modulestate* m);

/**
* @brief Get the struct from the model
Expand All @@ -200,5 200,5 @@ PyAPI_FUNC(int) CpStructModel_Check(PyObject* model, _modulestate* m);
* @param m the module state, may be NULL
* @return the struct object, or NULL if the model does not store a struct
*/
PyAPI_FUNC(PyObject*) CpStructModel_GetStruct(PyObject* model, _modulestate* m);
// PyAPI_FUNC(PyObject*) CpStructModel_GetStruct(PyObject* model, _modulestate* m);
#endif
Loading

0 comments on commit 0483e97

Please sign in to comment.