Debian Codegraph @

pypy/module/cpyext/parse/cpyext_descrobject.h

raw symbols SCIP
1 typedef PyObject *(*getter)(PyObject *, void *);
2 typedef int (*setter)(PyObject *, PyObject *, void *);
3
4 typedef struct PyGetSetDef {
5 const char *name;
6 getter get;
7 setter set;
8 const char *doc;
9 void *closure;
10 } PyGetSetDef;
11
12 typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args,
13 void *wrapped);
14
15 typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args,
16 void *wrapped, PyObject *kwds);
17
18 struct wrapperbase {
19 const char *name;
20 int offset;
21 void *function;
22 wrapperfunc wrapper;
23 const char *doc;
24 int flags;
25 PyObject *name_strobj;
26 };
27
28 /* Flags for above struct */
29 #define PyWrapperFlag_KEYWORDS 1 /* wrapper function takes keyword args */
30
31 /* Various kinds of descriptor objects */
32
33 typedef struct {
34 PyObject_HEAD
35 PyTypeObject *d_type;
36 PyObject *d_name;
37 PyObject *d_qualname;
38 } PyDescrObject;
39
40 #define PyDescr_COMMON PyDescrObject d_common
41
42 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
43 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
44
45 typedef struct {
46 PyDescr_COMMON;
47 PyMethodDef *d_method;
48 } PyMethodDescrObject;
49
50 typedef struct {
51 PyDescr_COMMON;
52 struct PyMemberDef *d_member;
53 } PyMemberDescrObject;
54
55 typedef struct {
56 PyDescr_COMMON;
57 PyGetSetDef *d_getset;
58 } PyGetSetDescrObject;
59
60 typedef struct {
61 PyDescr_COMMON;
62 struct wrapperbase *d_base;
63 void *d_wrapped; /* This can be any function pointer */
64 } PyWrapperDescrObject;