/* Interface to map C struct members to Python object attributes */
#include <stddef.h> /* For offsetof */
/* An array of PyMemberDef structures defines the name, type and offset of selected members of a C structure. These can be read by PyMember_GetOne() and set by PyMember_SetOne() (except if their READONLY flag is set). The array must be terminated with an entry whose name pointer is NULL. */
typedef struct PyMemberDef { const char *name; int type; Py_ssize_t offset; int flags; const char *doc; } PyMemberDef;
/* Added by Jack: strings contained in the structure */ #define T_STRING_INPLACE 13
/* Added by Lillo: bools contained in the structure (assumed char) */ #define T_BOOL 14
#define T_OBJECT_EX 16 /* Like T_OBJECT, but raises AttributeError when the value is NULL, instead of converting to None. */ #define T_LONGLONG 17 #define T_ULONGLONG 18
#define T_PYSSIZET 19 /* Py_ssize_t */ #define T_NONE 20 /* Value is always None */