mercurial/cext/util.h
changeset 48821 b0dd39b91e7a
parent 48266 749946b6a641
child 48822 3aa1b7ded52c
equal deleted inserted replaced
48820:acf9f778e048 48821:b0dd39b91e7a
    10 
    10 
    11 #include "compat.h"
    11 #include "compat.h"
    12 
    12 
    13 #if PY_MAJOR_VERSION >= 3
    13 #if PY_MAJOR_VERSION >= 3
    14 #define IS_PY3K
    14 #define IS_PY3K
    15 #endif
       
    16 
       
    17 /* helper to switch things like string literal depending on Python version */
       
    18 #ifdef IS_PY3K
       
    19 #define PY23(py2, py3) py3
       
    20 #else
       
    21 #define PY23(py2, py3) py2
       
    22 #endif
    15 #endif
    23 
    16 
    24 /* clang-format off */
    17 /* clang-format off */
    25 typedef struct {
    18 typedef struct {
    26 	PyObject_HEAD
    19 	PyObject_HEAD