]> arthur.barton.de Git - bup.git/blob - dev/python.c
88df9e2d2c97ee35868f48d4bce955a97cca38a5
[bup.git] / dev / python.c
1 #define _LARGEFILE64_SOURCE 1
2 #define PY_SSIZE_T_CLEAN 1
3 #undef NDEBUG
4 #include "../config/config.h"
5
6 // According to Python, its header has to go first:
7 //   http://docs.python.org/2/c-api/intro.html#include-files
8 //   http://docs.python.org/3/c-api/intro.html#include-files
9 #include <Python.h>
10
11 #include "bup/compat.h"
12
13 #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 8
14 # define bup_py_main bup_py_bytes_main
15 #elif PY_MAJOR_VERSION > 2
16 # define bup_py_main Py_BytesMain
17 #else
18 # define bup_py_main Py_Main
19 #endif
20
21 int main(int argc, char **argv)
22 {
23     return bup_py_main (argc, argv);
24 }