Show More
@@ -177,7 +177,6 b' static PyMethodDef methods[] = {' | |||
|
177 | 177 | |
|
178 | 178 | static const int version = 1; |
|
179 | 179 | |
|
180 | #ifdef IS_PY3K | |
|
181 | 180 | static struct PyModuleDef base85_module = { |
|
182 | 181 | PyModuleDef_HEAD_INIT, "base85", base85_doc, -1, methods, |
|
183 | 182 | }; |
@@ -191,13 +190,3 b' PyMODINIT_FUNC PyInit_base85(void)' | |||
|
191 | 190 | PyModule_AddIntConstant(m, "version", version); |
|
192 | 191 | return m; |
|
193 | 192 | } |
|
194 | #else | |
|
195 | PyMODINIT_FUNC initbase85(void) | |
|
196 | { | |
|
197 | PyObject *m; | |
|
198 | m = Py_InitModule3("base85", methods, base85_doc); | |
|
199 | ||
|
200 | b85prep(); | |
|
201 | PyModule_AddIntConstant(m, "version", version); | |
|
202 | } | |
|
203 | #endif |
@@ -337,7 +337,6 b' static PyMethodDef methods[] = {' | |||
|
337 | 337 | |
|
338 | 338 | static const int version = 3; |
|
339 | 339 | |
|
340 | #ifdef IS_PY3K | |
|
341 | 340 | static struct PyModuleDef bdiff_module = { |
|
342 | 341 | PyModuleDef_HEAD_INIT, "bdiff", mdiff_doc, -1, methods, |
|
343 | 342 | }; |
@@ -349,11 +348,3 b' PyMODINIT_FUNC PyInit_bdiff(void)' | |||
|
349 | 348 | PyModule_AddIntConstant(m, "version", version); |
|
350 | 349 | return m; |
|
351 | 350 | } |
|
352 | #else | |
|
353 | PyMODINIT_FUNC initbdiff(void) | |
|
354 | { | |
|
355 | PyObject *m; | |
|
356 | m = Py_InitModule3("bdiff", methods, mdiff_doc); | |
|
357 | PyModule_AddIntConstant(m, "version", version); | |
|
358 | } | |
|
359 | #endif |
@@ -182,7 +182,6 b' static PyMethodDef methods[] = {' | |||
|
182 | 182 | |
|
183 | 183 | static const int version = 1; |
|
184 | 184 | |
|
185 | #ifdef IS_PY3K | |
|
186 | 185 | static struct PyModuleDef mpatch_module = { |
|
187 | 186 | PyModuleDef_HEAD_INIT, "mpatch", mpatch_doc, -1, methods, |
|
188 | 187 | }; |
@@ -203,13 +202,3 b' PyMODINIT_FUNC PyInit_mpatch(void)' | |||
|
203 | 202 | |
|
204 | 203 | return m; |
|
205 | 204 | } |
|
206 | #else | |
|
207 | PyMODINIT_FUNC initmpatch(void) | |
|
208 | { | |
|
209 | PyObject *m; | |
|
210 | m = Py_InitModule3("mpatch", methods, mpatch_doc); | |
|
211 | mpatch_Error = | |
|
212 | PyErr_NewException("mercurial.cext.mpatch.mpatchError", NULL, NULL); | |
|
213 | PyModule_AddIntConstant(m, "version", version); | |
|
214 | } | |
|
215 | #endif |
@@ -1387,7 +1387,6 b' static PyMethodDef methods[] = {' | |||
|
1387 | 1387 | |
|
1388 | 1388 | static const int version = 4; |
|
1389 | 1389 | |
|
1390 | #ifdef IS_PY3K | |
|
1391 | 1390 | static struct PyModuleDef osutil_module = { |
|
1392 | 1391 | PyModuleDef_HEAD_INIT, |
|
1393 | 1392 | "osutil", |
@@ -1406,14 +1405,3 b' PyMODINIT_FUNC PyInit_osutil(void)' | |||
|
1406 | 1405 | PyModule_AddIntConstant(m, "version", version); |
|
1407 | 1406 | return m; |
|
1408 | 1407 | } |
|
1409 | #else | |
|
1410 | PyMODINIT_FUNC initosutil(void) | |
|
1411 | { | |
|
1412 | PyObject *m; | |
|
1413 | if (PyType_Ready(&listdir_stat_type) == -1) | |
|
1414 | return; | |
|
1415 | ||
|
1416 | m = Py_InitModule3("osutil", methods, osutil_doc); | |
|
1417 | PyModule_AddIntConstant(m, "version", version); | |
|
1418 | } | |
|
1419 | #endif |
@@ -1307,7 +1307,6 b' static int check_python_version(void)' | |||
|
1307 | 1307 | return 0; |
|
1308 | 1308 | } |
|
1309 | 1309 | |
|
1310 | #ifdef IS_PY3K | |
|
1311 | 1310 | static struct PyModuleDef parsers_module = {PyModuleDef_HEAD_INIT, "parsers", |
|
1312 | 1311 | parsers_doc, -1, methods}; |
|
1313 | 1312 | |
@@ -1321,15 +1320,3 b' PyMODINIT_FUNC PyInit_parsers(void)' | |||
|
1321 | 1320 | module_init(mod); |
|
1322 | 1321 | return mod; |
|
1323 | 1322 | } |
|
1324 | #else | |
|
1325 | PyMODINIT_FUNC initparsers(void) | |
|
1326 | { | |
|
1327 | PyObject *mod; | |
|
1328 | ||
|
1329 | if (check_python_version() == -1) { | |
|
1330 | return; | |
|
1331 | } | |
|
1332 | mod = Py_InitModule3("parsers", methods, parsers_doc); | |
|
1333 | module_init(mod); | |
|
1334 | } | |
|
1335 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now