29 #ifndef __PYTHON3COMPATIBILITY_H__
30 #define __PYTHON3COMPATIBILITY_H__
38 #if defined _DEBUG && ! defined HAVE_PYTHON_DEBUG_LIBRARY
39 #define _DEBUG_UNDEFED
51 #if defined(__APPLE__) && defined(__MACH__) && defined( HAVE_PYTHON_OSX_FRAMEWORK )
52 #include <Python/Python.h>
55 #ifdef _POSIX_C_SOURCE
56 #undef _POSIX_C_SOURCE
72 inline H3D::Field *getFieldPointer(PyObject * po) {
74 ( PyCapsule_GetPointer( po, NULL ) );
78 #if PY_MAJOR_VERSION >= 3
80 inline PyObject *Py_FindMethod(PyMethodDef[], PyObject *o,
const char *name){
81 PyObject *nameobj = PyUnicode_FromString(name);
82 return PyObject_GenericGetAttr((PyObject *)o, nameobj);
86 #define PyInt_Check PyLong_Check
87 #define PyInt_FromLong PyLong_FromLong
88 #define PyInt_AsLong PyLong_AsLong
89 #define PyInt_FromSize_t PyLong_FromSize_t
93 #define Py_TPFLAGS_CHECKTYPES 0
96 #define PyString_Check PyUnicode_Check
97 #define PyString_AsString(X) ( PyBytes_AsString( PyUnicode_AsUTF8String(X) ) )
98 #define PyString_FromString(X) PyUnicode_FromString(X)
Contains the Field class.
Base header file that handles all configuration related settings.
The Field class.
Definition: Field.h:46