]> arthur.barton.de Git - bup.git/blobdiff - dev/python.c
pylint: enable unidiomatic-typecheck
[bup.git] / dev / python.c
index 0c4150818e0e324b01be0bacbc69513021db7be0..88df9e2d2c97ee35868f48d4bce955a97cca38a5 100644 (file)
@@ -8,10 +8,14 @@
 //   http://docs.python.org/3/c-api/intro.html#include-files
 #include <Python.h>
 
-#if PY_MAJOR_VERSION > 2
-#define bup_py_main Py_BytesMain
-# else
-#define bup_py_main Py_Main
+#include "bup/compat.h"
+
+#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 8
+# define bup_py_main bup_py_bytes_main
+#elif PY_MAJOR_VERSION > 2
+# define bup_py_main Py_BytesMain
+#else
+# define bup_py_main Py_Main
 #endif
 
 int main(int argc, char **argv)