@@ -115,11 +115,30 @@ static PyMethodDef ThemeDrawingStateObj_methods[] = {
115115
116116#define ThemeDrawingStateObj_getsetlist NULL
117117
118+
118119#define ThemeDrawingStateObj_compare NULL
119120
120121#define ThemeDrawingStateObj_repr NULL
121122
122123#define ThemeDrawingStateObj_hash NULL
124+ #define ThemeDrawingStateObj_tp_init 0
125+
126+ #define ThemeDrawingStateObj_tp_alloc PyType_GenericAlloc
127+
128+ static PyObject * ThemeDrawingStateObj_tp_new (PyTypeObject * type , PyObject * args , PyObject * kwds )
129+ {
130+ PyObject * self ;
131+ ThemeDrawingState itself ;
132+ char * kw [] = {"itself" , 0 };
133+
134+ if (!PyArg_ParseTupleAndKeywords (args , kwds , "O&" , kw , ThemeDrawingStateObj_Convert , & itself )) return NULL ;
135+ if ((self = type -> tp_alloc (type , 0 )) == NULL ) return NULL ;
136+ ((ThemeDrawingStateObject * )self )-> ob_itself = itself ;
137+ return self ;
138+ }
139+
140+ #define ThemeDrawingStateObj_tp_free PyObject_Del
141+
123142
124143PyTypeObject ThemeDrawingState_Type = {
125144 PyObject_HEAD_INIT (NULL )
@@ -142,19 +161,27 @@ PyTypeObject ThemeDrawingState_Type = {
142161 0 , /*tp_str*/
143162 PyObject_GenericGetAttr , /*tp_getattro*/
144163 PyObject_GenericSetAttr , /*tp_setattro */
145- 0 , /*outputHook_tp_as_buffer */
146- 0 , /*outputHook_tp_flags */
147- 0 , /*outputHook_tp_doc */
148- 0 , /*outputHook_tp_traverse */
149- 0 , /*outputHook_tp_clear */
150- 0 , /*outputHook_tp_richcompare */
151- 0 , /*outputHook_tp_weaklistoffset */
152- 0 , /*outputHook_tp_iter */
153- 0 , /*outputHook_tp_iternext */
164+ 0 , /*tp_as_buffer */
165+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
166+ 0 , /*tp_doc */
167+ 0 , /*tp_traverse */
168+ 0 , /*tp_clear */
169+ 0 , /*tp_richcompare */
170+ 0 , /*tp_weaklistoffset */
171+ 0 , /*tp_iter */
172+ 0 , /*tp_iternext */
154173 ThemeDrawingStateObj_methods , /* tp_methods */
155- 0 , /*outputHook_tp_members */
174+ 0 , /*tp_members */
156175 ThemeDrawingStateObj_getsetlist , /*tp_getset*/
157- 0 , /*outputHook_tp_base*/
176+ 0 , /*tp_base*/
177+ 0 , /*tp_dict*/
178+ 0 , /*tp_descr_get*/
179+ 0 , /*tp_descr_set*/
180+ 0 , /*tp_dictoffset*/
181+ ThemeDrawingStateObj_tp_init , /* tp_init */
182+ ThemeDrawingStateObj_tp_alloc , /* tp_alloc */
183+ ThemeDrawingStateObj_tp_new , /* tp_new */
184+ ThemeDrawingStateObj_tp_free , /* tp_free */
158185};
159186
160187/* --------------- End object type ThemeDrawingState ---------------- */
@@ -1822,8 +1849,10 @@ void init_App(void)
18221849 return ;
18231850 ThemeDrawingState_Type .ob_type = & PyType_Type ;
18241851 Py_INCREF (& ThemeDrawingState_Type );
1825- if (PyDict_SetItemString (d , "ThemeDrawingStateType" , (PyObject * )& ThemeDrawingState_Type ) != 0 )
1826- Py_FatalError ("can't initialize ThemeDrawingStateType" );
1852+ PyModule_AddObject (m , "ThemeDrawingState" , (PyObject * )& ThemeDrawingState_Type );
1853+ /* Backward-compatible name */
1854+ Py_INCREF (& ThemeDrawingState_Type );
1855+ PyModule_AddObject (m , "ThemeDrawingStateType" , (PyObject * )& ThemeDrawingState_Type );
18271856}
18281857
18291858/* ======================== End module _App ========================= */
0 commit comments