Panda3D
 All Classes Functions Variables Enumerations
dcPython.h
00001 // Filename: dcPython.h
00002 // Created by:  drose (22Jun04)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef DCPYTHON_H
00016 #define DCPYTHON_H
00017 
00018 // The only purpose of this file is to serve as a common place to put
00019 // the nonsense associated with #including <Python.h>.
00020 
00021 #ifdef HAVE_PYTHON
00022 
00023 #undef HAVE_LONG_LONG  // NSPR and Python both define this.
00024 #undef _POSIX_C_SOURCE
00025 #include <Python.h>
00026 
00027 // Python 2.5 adds Py_ssize_t; earlier versions don't have it.
00028 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
00029 typedef int Py_ssize_t;
00030 #define PY_SSIZE_T_MAX INT_MAX
00031 #define PY_SSIZE_T_MIN INT_MIN
00032 #endif
00033 
00034 // Several interfaces in this module that use Python also require
00035 // these header files, so we might as well pick them up too.
00036 #include "datagram.h"
00037 #include "datagramIterator.h"
00038 
00039 #endif  // HAVE_PYTHON
00040 
00041 #endif
 All Classes Functions Variables Enumerations