Skip to content

Commit ca09734

Browse files
committed
First commit with actual source code
1 parent 8ce5de8 commit ca09734

10 files changed

Lines changed: 5555 additions & 0 deletions

File tree

ENodeType.c

Lines changed: 2643 additions & 0 deletions
Large diffs are not rendered by default.

ENodeType.h

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#include <stdlib.h>
2+
#include <Python.h>
3+
4+
#include <structmember.h>
5+
6+
typedef struct {
7+
PyObject_HEAD
8+
9+
PyObject *dict;
10+
} Enum;
11+
12+
void Enum_init_type(PyObject *m);
13+
14+
void EVendor_init(Enum *type);
15+
16+
void gsp_efindsqlstatetype_init(Enum *type);
17+
void EErrorType_init(Enum *type);
18+
void gsp_token_code_init(Enum *type);
19+
void EStmtType_init(Enum *type);
20+
void ETokenStatus_init(Enum *type);
21+
void EJoinSource_init(Enum *type);
22+
void EJoinType_init(Enum *type);
23+
void EFireMode_init(Enum *type);
24+
void ETriggerMode_init(Enum *type);
25+
void EStoreProcedureMode_init(Enum *type);
26+
void EParameterMode_init(Enum *type);
27+
void EHowtoSetValue_init(Enum *type);
28+
void EWhatDeclared_init(Enum *type);
29+
void EInsertValue_init(Enum *type);
30+
void EIndexType_init(Enum *type);
31+
void EAggregateType_init(Enum *type);
32+
void EAlterTableOptionType_init(Enum *type);
33+
void ETableSource_init(Enum *type);
34+
void EConstraintType_init(Enum *type);
35+
void EKeyReferenceType_init(Enum *type);
36+
void ESetOperator_init(Enum *type);
37+
void EDataType_init(Enum *type);
38+
void EFunctionType_init(Enum *type);
39+
void EDBObjectType_init(Enum *type);
40+
void ENodeType_init(Enum *type);
41+
void EExpressionType_init(Enum *type);
42+
void gsp_dbvendor_init(Enum *type);
43+
void EAccessMode_init(Enum *type);
44+
void EQeuryClause_init(Enum *type);
45+
void EConstantType_init(Enum *type);
46+
void EKeyActionType_init(Enum *type);
47+
void EMatchType_init(Enum *type);
48+
void EDistinctType_init(Enum *type);
49+
void gsp_EDeclareType_init(Enum *type);
50+
void gsp_EVariableType_init(Enum *type);
51+
void ECreateType_init(Enum *type);
52+
void EExecType_init(Enum *type);
53+
void ESetType_init(Enum *type);
54+
55+
56+
static PyMemberDef NodeTypeE_members[] = {
57+
{"__dict__", T_OBJECT, offsetof(Enum, dict), READONLY},
58+
{NULL} /* Sentinel */
59+
};
60+
61+
static PyMethodDef NodeTypeE_methods[] = {
62+
// regular methods
63+
{NULL} /* Sentinel */
64+
};
65+
66+
static PyTypeObject EnumType = {
67+
PyObject_HEAD_INIT(NULL)
68+
0, /*ob_size*/
69+
"parsebridge.Enum", /*tp_name*/
70+
sizeof(Enum), /*tp_basicsize*/
71+
0, /*tp_itemsize*/
72+
0, /*tp_dealloc*/
73+
0, /*tp_print*/
74+
0, //(getattrfunc)NodeTypeE_getattr, /*tp_getattr*/
75+
0, /*tp_setattr*/
76+
0, /*tp_compare*/
77+
0, /*tp_repr*/
78+
0, /*tp_as_number*/
79+
0, /*tp_as_sequence*/
80+
0, /*tp_as_mapping*/
81+
0, /*tp_hash */
82+
0, /*tp_call*/
83+
0, /*tp_str*/
84+
PyObject_GenericGetAttr, /*tp_getattro*/
85+
0, /*tp_setattro*/
86+
0, /*tp_as_buffer*/
87+
Py_TPFLAGS_DEFAULT, /*tp_flags*/
88+
"Node Type enum", /* tp_doc */
89+
0, /* tp_traverse */
90+
0, /* tp_clear */
91+
0, /* tp_richcompare */
92+
0, /* tp_weaklistoffset */
93+
0, /* tp_iter */
94+
0, /* tp_iternext */
95+
NodeTypeE_methods, /* tp_methods */
96+
NodeTypeE_members, /* tp_members */
97+
0, /* tp_getset */
98+
0, /* tp_base */
99+
0, /* tp_dict */
100+
0, /* tp_descr_get */
101+
0, /* tp_descr_set */
102+
offsetof(Enum, dict), /* tp_dictoffset */
103+
0, //(initproc)Shoddy_init, /* tp_init */
104+
0, /* tp_alloc */
105+
0, /* tp_new */
106+
};

0 commit comments

Comments
 (0)