mercurial/cext/charencode.c
changeset 33812 4ba863c88135
parent 33759 a22339d389d4
child 33925 2c37f9dabc32
equal deleted inserted replaced
33811:dabe1f11ae3a 33812:4ba863c88135
    10 #define PY_SSIZE_T_CLEAN
    10 #define PY_SSIZE_T_CLEAN
    11 #include <Python.h>
    11 #include <Python.h>
    12 
    12 
    13 #include "charencode.h"
    13 #include "charencode.h"
    14 #include "util.h"
    14 #include "util.h"
       
    15 
       
    16 #ifdef IS_PY3K
       
    17 /* The mapping of Python types is meant to be temporary to get Python
       
    18  * 3 to compile. We should remove this once Python 3 support is fully
       
    19  * supported and proper types are used in the extensions themselves. */
       
    20 #define PyInt_Type PyLong_Type
       
    21 #define PyInt_AS_LONG PyLong_AS_LONG
       
    22 #endif
    15 
    23 
    16 static const char lowertable[128] = {
    24 static const char lowertable[128] = {
    17 	'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
    25 	'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
    18 	'\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
    26 	'\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
    19 	'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
    27 	'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',