lib
pythonconfig.h
00001 /*************************************************************************** 00002 * pythonconfig.h 00003 * This file is part of the KDE project 00004 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org) 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; see the file COPYING. If not, write to 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 ***************************************************************************/ 00019 00020 #ifndef KROSS_PYTHON_CONFIG_H 00021 #define KROSS_PYTHON_CONFIG_H 00022 00023 #include "../main/krossconfig.h" 00024 00025 // Prevent warnings 00026 #if defined(_XOPEN_SOURCE) 00027 #undef _XOPEN_SOURCE 00028 #endif 00029 #if defined(_POSIX_C_SOURCE) 00030 #undef _POSIX_C_SOURCE 00031 #endif 00032 00033 // The Python.h needs to be included first. 00034 #include <Python.h> 00035 #include <object.h> 00036 #include <compile.h> 00037 #include <eval.h> 00038 #include <frameobject.h> 00039 00040 // Include the PyCXX stuff. 00041 #include "cxx/Config.hxx" 00042 #include "cxx/Objects.hxx" 00043 #include "cxx/Extensions.hxx" 00044 00045 namespace Kross { 00046 00069 namespace Python { 00070 00071 // The version of this python plugin. This will be exported 00072 // to the scripting code. That way we're able to write 00073 // scripting code for different incompatible Kross python 00074 // bindings by checking the version. You should increment 00075 // this number only if you really know what you're doing. 00076 #define KROSS_PYTHON_VERSION 1 00077 00078 // Enable debugging for Kross::Python::PythonScript 00079 //#define KROSS_PYTHON_SCRIPT_CTOR_DEBUG 00080 //#define KROSS_PYTHON_SCRIPT_DTOR_DEBUG 00081 //#define KROSS_PYTHON_SCRIPT_INIT_DEBUG 00082 //#define KROSS_PYTHON_SCRIPT_FINALIZE_DEBUG 00083 //#define KROSS_PYTHON_SCRIPT_EXEC_DEBUG 00084 //#define KROSS_PYTHON_SCRIPT_CALLFUNC_DEBUG 00085 //#define KROSS_PYTHON_SCRIPT_CLASSINSTANCE_DEBUG 00086 00087 // Enable debugging for Kross::Python::PythonModule 00088 //#define KROSS_PYTHON_MODULE_DEBUG 00089 00090 // Enable debugging for Kross::Python::PythonExtension 00091 //#define KROSS_PYTHON_EXTENSION_CTOR_DEBUG 00092 //#define KROSS_PYTHON_EXTENSION_DTOR_DEBUG 00093 00094 //#define KROSS_PYTHON_EXTENSION_TOOBJECT_DEBUG 00095 //#define KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG 00096 00097 //#define KROSS_PYTHON_EXTENSION_GETATTR_DEBUG 00098 //#define KROSS_PYTHON_EXTENSION_GETATTRMETHOD_DEBUG 00099 //#define KROSS_PYTHON_EXTENSION_SETATTR_DEBUG 00100 00101 //#define KROSS_PYTHON_EXTENSION_CALL_DEBUG 00102 00103 }} 00104 00105 #endif