Show More
@@ -164,6 +164,8 static PyMethodDef methods[] = { | |||||
164 | {NULL, NULL} |
|
164 | {NULL, NULL} | |
165 | }; |
|
165 | }; | |
166 |
|
166 | |||
|
167 | static const int version = 1; | |||
|
168 | ||||
167 | #ifdef IS_PY3K |
|
169 | #ifdef IS_PY3K | |
168 | static struct PyModuleDef diffhelpers_module = { |
|
170 | static struct PyModuleDef diffhelpers_module = { | |
169 | PyModuleDef_HEAD_INIT, |
|
171 | PyModuleDef_HEAD_INIT, | |
@@ -185,6 +187,7 PyMODINIT_FUNC PyInit_diffhelpers(void) | |||||
185 | NULL, NULL); |
|
187 | NULL, NULL); | |
186 | Py_INCREF(diffhelpers_Error); |
|
188 | Py_INCREF(diffhelpers_Error); | |
187 | PyModule_AddObject(m, "diffhelpersError", diffhelpers_Error); |
|
189 | PyModule_AddObject(m, "diffhelpersError", diffhelpers_Error); | |
|
190 | PyModule_AddIntConstant(m, "version", version); | |||
188 |
|
191 | |||
189 | return m; |
|
192 | return m; | |
190 | } |
|
193 | } | |
@@ -192,8 +195,10 PyMODINIT_FUNC PyInit_diffhelpers(void) | |||||
192 | PyMODINIT_FUNC |
|
195 | PyMODINIT_FUNC | |
193 | initdiffhelpers(void) |
|
196 | initdiffhelpers(void) | |
194 | { |
|
197 | { | |
195 | Py_InitModule3("diffhelpers", methods, diffhelpers_doc); |
|
198 | PyObject *m; | |
|
199 | m = Py_InitModule3("diffhelpers", methods, diffhelpers_doc); | |||
196 | diffhelpers_Error = PyErr_NewException("diffhelpers.diffhelpersError", |
|
200 | diffhelpers_Error = PyErr_NewException("diffhelpers.diffhelpersError", | |
197 | NULL, NULL); |
|
201 | NULL, NULL); | |
|
202 | PyModule_AddIntConstant(m, "version", version); | |||
198 | } |
|
203 | } | |
199 | #endif |
|
204 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now