Show More
@@ -17,14 +17,6 b'' | |||||
17 | #include "charencode.h" |
|
17 | #include "charencode.h" | |
18 | #include "util.h" |
|
18 | #include "util.h" | |
19 |
|
19 | |||
20 | /* The mapping of Python types is meant to be temporary to get Python |
|
|||
21 | * 3 to compile. We should remove this once Python 3 support is fully |
|
|||
22 | * supported and proper types are used in the extensions themselves. */ |
|
|||
23 | #define PyInt_Check PyLong_Check |
|
|||
24 | #define PyInt_FromLong PyLong_FromLong |
|
|||
25 | #define PyInt_FromSsize_t PyLong_FromSsize_t |
|
|||
26 | #define PyInt_AsLong PyLong_AsLong |
|
|||
27 |
|
||||
28 | static const char *const versionerrortext = "Python minor version mismatch"; |
|
20 | static const char *const versionerrortext = "Python minor version mismatch"; | |
29 |
|
21 | |||
30 | static const int dirstate_v1_from_p2 = -2; |
|
22 | static const int dirstate_v1_from_p2 = -2; | |
@@ -305,17 +297,17 b' static PyObject *dirstate_item_v1_state(' | |||||
305 |
|
297 | |||
306 | static PyObject *dirstate_item_v1_mode(dirstateItemObject *self) |
|
298 | static PyObject *dirstate_item_v1_mode(dirstateItemObject *self) | |
307 | { |
|
299 | { | |
308 |
return Py |
|
300 | return PyLong_FromLong(dirstate_item_c_v1_mode(self)); | |
309 | }; |
|
301 | }; | |
310 |
|
302 | |||
311 | static PyObject *dirstate_item_v1_size(dirstateItemObject *self) |
|
303 | static PyObject *dirstate_item_v1_size(dirstateItemObject *self) | |
312 | { |
|
304 | { | |
313 |
return Py |
|
305 | return PyLong_FromLong(dirstate_item_c_v1_size(self)); | |
314 | }; |
|
306 | }; | |
315 |
|
307 | |||
316 | static PyObject *dirstate_item_v1_mtime(dirstateItemObject *self) |
|
308 | static PyObject *dirstate_item_v1_mtime(dirstateItemObject *self) | |
317 | { |
|
309 | { | |
318 |
return Py |
|
310 | return PyLong_FromLong(dirstate_item_c_v1_mtime(self)); | |
319 | }; |
|
311 | }; | |
320 |
|
312 | |||
321 | static PyObject *dirstate_item_mtime_likely_equal_to(dirstateItemObject *self, |
|
313 | static PyObject *dirstate_item_mtime_likely_equal_to(dirstateItemObject *self, | |
@@ -561,17 +553,17 b' static PyMethodDef dirstate_item_methods' | |||||
561 |
|
553 | |||
562 | static PyObject *dirstate_item_get_mode(dirstateItemObject *self) |
|
554 | static PyObject *dirstate_item_get_mode(dirstateItemObject *self) | |
563 | { |
|
555 | { | |
564 |
return Py |
|
556 | return PyLong_FromLong(dirstate_item_c_v1_mode(self)); | |
565 | }; |
|
557 | }; | |
566 |
|
558 | |||
567 | static PyObject *dirstate_item_get_size(dirstateItemObject *self) |
|
559 | static PyObject *dirstate_item_get_size(dirstateItemObject *self) | |
568 | { |
|
560 | { | |
569 |
return Py |
|
561 | return PyLong_FromLong(dirstate_item_c_v1_size(self)); | |
570 | }; |
|
562 | }; | |
571 |
|
563 | |||
572 | static PyObject *dirstate_item_get_mtime(dirstateItemObject *self) |
|
564 | static PyObject *dirstate_item_get_mtime(dirstateItemObject *self) | |
573 | { |
|
565 | { | |
574 |
return Py |
|
566 | return PyLong_FromLong(dirstate_item_c_v1_mtime(self)); | |
575 | }; |
|
567 | }; | |
576 |
|
568 | |||
577 | static PyObject *dirstate_item_get_state(dirstateItemObject *self) |
|
569 | static PyObject *dirstate_item_get_state(dirstateItemObject *self) | |
@@ -1279,7 +1271,7 b' static int check_python_version(void)' | |||||
1279 | if (!ver) { |
|
1271 | if (!ver) { | |
1280 | return -1; |
|
1272 | return -1; | |
1281 | } |
|
1273 | } | |
1282 |
hexversion = Py |
|
1274 | hexversion = PyLong_AsLong(ver); | |
1283 | Py_DECREF(ver); |
|
1275 | Py_DECREF(ver); | |
1284 | /* sys.hexversion is a 32-bit number by default, so the -1 case |
|
1276 | /* sys.hexversion is a 32-bit number by default, so the -1 case | |
1285 | * should only occur in unusual circumstances (e.g. if sys.hexversion |
|
1277 | * should only occur in unusual circumstances (e.g. if sys.hexversion |
General Comments 0
You need to be logged in to leave comments.
Login now