comparison mercurial/cext/parsers.c @ 48907:824b2082550e

cext: remove Python 2 support We still alias the Python 2 symbols. This will be cleaned up in a separate commit. Differential Revision: https://phab.mercurial-scm.org/D12227
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Feb 2022 15:47:13 -0700
parents ed03fffaac30
children c1ad4364a5b5
comparison
equal deleted inserted replaced
48906:e9ca736f5b52 48907:824b2082550e
15 15
16 #include "bitmanipulation.h" 16 #include "bitmanipulation.h"
17 #include "charencode.h" 17 #include "charencode.h"
18 #include "util.h" 18 #include "util.h"
19 19
20 #ifdef IS_PY3K
21 /* The mapping of Python types is meant to be temporary to get Python 20 /* The mapping of Python types is meant to be temporary to get Python
22 * 3 to compile. We should remove this once Python 3 support is fully 21 * 3 to compile. We should remove this once Python 3 support is fully
23 * supported and proper types are used in the extensions themselves. */ 22 * supported and proper types are used in the extensions themselves. */
24 #define PyInt_Check PyLong_Check 23 #define PyInt_Check PyLong_Check
25 #define PyInt_FromLong PyLong_FromLong 24 #define PyInt_FromLong PyLong_FromLong
26 #define PyInt_FromSsize_t PyLong_FromSsize_t 25 #define PyInt_FromSsize_t PyLong_FromSsize_t
27 #define PyInt_AsLong PyLong_AsLong 26 #define PyInt_AsLong PyLong_AsLong
28 #else
29 /* Windows on Python 2.7 doesn't define S_IFLNK. Python 3+ defines via
30 * pyport.h. */
31 #ifndef S_IFLNK
32 #define S_IFLNK 0120000
33 #endif
34 #endif
35 27
36 static const char *const versionerrortext = "Python minor version mismatch"; 28 static const char *const versionerrortext = "Python minor version mismatch";
37 29
38 static const int dirstate_v1_from_p2 = -2; 30 static const int dirstate_v1_from_p2 = -2;
39 static const int dirstate_v1_nonnormal = -1; 31 static const int dirstate_v1_nonnormal = -1;