File: python.c

package info (click to toggle)
bup 0.33.9-1.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,712 kB
  • sloc: python: 15,897; sh: 5,764; ansic: 2,965; pascal: 669; makefile: 21
file content (24 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#define _LARGEFILE64_SOURCE 1
#define PY_SSIZE_T_CLEAN 1
#undef NDEBUG
#include "../config/config.h"

// According to Python, its header has to go first:
//   http://docs.python.org/3/c-api/intro.html#include-files
#include <Python.h>

#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)
{
    assert(argc > 0);
    return bup_py_main (argc, argv);
}