comparison mercurial/parsers.c @ 30112:9b6ff0f940ed

parsers: move PyInt aliasing out of util.h The PyInt aliasing is only used by parsers.c. Since we don't want to encourage the use of PyInt parsing, move the aliasing to parsers.c.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 09 Oct 2016 13:50:53 +0200
parents 74cd33c9be76
children 5f7151e6de85
comparison
equal deleted inserted replaced
30111:a989fa78dafa 30112:9b6ff0f940ed
12 #include <stddef.h> 12 #include <stddef.h>
13 #include <string.h> 13 #include <string.h>
14 14
15 #include "util.h" 15 #include "util.h"
16 #include "bitmanipulation.h" 16 #include "bitmanipulation.h"
17
18 #ifdef IS_PY3K
19 /* The mapping of Python types is meant to be temporary to get Python
20 * 3 to compile. We should remove this once Python 3 support is fully
21 * supported and proper types are used in the extensions themselves. */
22 #define PyInt_Type PyLong_Type
23 #define PyInt_FromLong PyLong_FromLong
24 #define PyInt_AsLong PyLong_AsLong
25 #endif
17 26
18 static char *versionerrortext = "Python minor version mismatch"; 27 static char *versionerrortext = "Python minor version mismatch";
19 28
20 static int8_t hextable[256] = { 29 static int8_t hextable[256] = {
21 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,