Panda3D
Loading...
Searching...
No Matches
dcPython.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file dcPython.h
10 * @author drose
11 * @date 2004-06-22
12 */
13
14#ifndef DCPYTHON_H
15#define DCPYTHON_H
16
17// The only purpose of this file is to serve as a common place to put the
18// nonsense associated with #including <Python.h>.
19
20#ifdef HAVE_PYTHON
21
22#define PY_SSIZE_T_CLEAN 1
23
24#undef _POSIX_C_SOURCE
25#undef _XOPEN_SOURCE
26#include <Python.h>
27
28// Python 2.5 adds Py_ssize_t; earlier versions don't have it.
29#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
30typedef int Py_ssize_t;
31#define PY_SSIZE_T_MAX INT_MAX
32#define PY_SSIZE_T_MIN INT_MIN
33#endif
34
35// Several interfaces in this module that use Python also require these header
36// files, so we might as well pick them up too.
37#include "datagram.h"
38#include "datagramIterator.h"
39
40#endif // HAVE_PYTHON
41
42#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.