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