this repo has no description
1/* Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) */
2#ifndef STRUCTMEMBER_H
3#define STRUCTMEMBER_H
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stddef.h>
9
10#include "cpython-types.h"
11
12typedef struct PyMemberDef {
13 const char* name;
14 int type;
15 Py_ssize_t offset;
16 int flags;
17 const char* doc;
18} PyMemberDef;
19
20/* C struct member types */
21#define T_SHORT 0
22#define T_INT 1
23#define T_LONG 2
24#define T_FLOAT 3
25#define T_DOUBLE 4
26#define T_STRING 5
27#define T_OBJECT 6
28#define T_CHAR 7
29#define T_BYTE 8
30#define T_UBYTE 9
31#define T_USHORT 10
32#define T_UINT 11
33#define T_ULONG 12
34#define T_STRING_INPLACE 13
35#define T_BOOL 14
36#define T_OBJECT_EX 16
37#define T_LONGLONG 17
38#define T_ULONGLONG 18
39#define T_PYSSIZET 19
40#define T_NONE 20
41
42/* C struct member flags */
43#define READONLY 1
44#define READ_RESTRICTED 2
45#define PY_WRITE_RESTRICTED 4
46#define RESTRICTED (READ_RESTRICTED | PY_WRITE_RESTRICTED)
47
48#ifdef __cplusplus
49}
50#endif
51#endif