Show More
@@ -192,6 +192,8 b' static PyMethodDef methods[] = {' | |||
|
192 | 192 | {NULL, NULL} |
|
193 | 193 | }; |
|
194 | 194 | |
|
195 | static const int version = 1; | |
|
196 | ||
|
195 | 197 | #ifdef IS_PY3K |
|
196 | 198 | static struct PyModuleDef bdiff_module = { |
|
197 | 199 | PyModuleDef_HEAD_INIT, |
@@ -203,11 +205,16 b' static struct PyModuleDef bdiff_module =' | |||
|
203 | 205 | |
|
204 | 206 | PyMODINIT_FUNC PyInit_bdiff(void) |
|
205 | 207 | { |
|
206 | return PyModule_Create(&bdiff_module); | |
|
208 | PyObject *m; | |
|
209 | m = PyModule_Create(&bdiff_module); | |
|
210 | PyModule_AddIntConstant(m, "version", version); | |
|
211 | return m; | |
|
207 | 212 | } |
|
208 | 213 | #else |
|
209 | 214 | PyMODINIT_FUNC initbdiff(void) |
|
210 | 215 | { |
|
211 | Py_InitModule3("bdiff", methods, mdiff_doc); | |
|
216 | PyObject *m; | |
|
217 | m = Py_InitModule3("bdiff", methods, mdiff_doc); | |
|
218 | PyModule_AddIntConstant(m, "version", version); | |
|
212 | 219 | } |
|
213 | 220 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now