mirror of
https://github.com/Team-Resurgent/XBMC4Xbox.git
synced 2026-08-15 11:18:13 -07:00
If ever adding the XBMC4Xbox source to GitHub use "git add -f -A" or it wont add all the files.
85 lines
3.0 KiB
C++
85 lines
3.0 KiB
C++
#pragma once
|
|
|
|
/*
|
|
* Copyright (C) 2005-2013 Team XBMC
|
|
* http://xbmc.org
|
|
*
|
|
* This Program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
* any later version.
|
|
*
|
|
* This Program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with XBMC; see the file COPYING. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
#define DATA_OBJECT(data) unsigned long pointer_##data;
|
|
|
|
#define _Py_NoneStruct (*((PyObject*)pointer__Py_NoneStruct))
|
|
#define _Py_NotImplementedStruct (*((PyObject*)pointer__Py_NotImplementedStruct))
|
|
#define _Py_TrueStruct (*((PyObject*)pointer__Py_TrueStruct))
|
|
#define _Py_ZeroStruct (*((PyObject*)pointer__Py_ZeroStruct))
|
|
#define PyString_Type (*((PyTypeObject*)pointer_PyString_Type))
|
|
#define PyList_Type (*((PyTypeObject*)pointer_PyList_Type))
|
|
#define PyLong_Type (*((PyTypeObject*)pointer_PyLong_Type))
|
|
#define PyInt_Type (*((PyTypeObject*)pointer_PyInt_Type))
|
|
#define PyUnicode_Type (*((PyTypeObject*)pointer_PyUnicode_Type))
|
|
#define PyTuple_Type (*((PyTypeObject*)pointer_PyTuple_Type))
|
|
#define PyDict_Type (*((PyTypeObject*)pointer_PyDict_Type))
|
|
|
|
#define PyExc_SystemError ((PyObject*)(*(long*)pointer_PyExc_SystemError))
|
|
#define PyExc_ValueError ((PyObject*)(*(long*)pointer_PyExc_ValueError))
|
|
#define PyExc_Exception ((PyObject*)(*(long*)pointer_PyExc_Exception))
|
|
#define PyExc_TypeError ((PyObject*)(*(long*)pointer_PyExc_TypeError))
|
|
#define PyExc_KeyboardInterrupt ((PyObject*)(*(long*)pointer_PyExc_KeyboardInterrupt))
|
|
#define PyExc_RuntimeError ((PyObject*)(*(long*)pointer_PyExc_RuntimeError))
|
|
#define PyExc_ReferenceError ((PyObject*)(*(long*)pointer_PyExc_ReferenceError))
|
|
/* Allow our modules to be compatible with Python2.4.
|
|
http://www.python.org/dev/peps/pep-0353/ */
|
|
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
|
|
typedef int Py_ssize_t;
|
|
#define PY_SSIZE_T_MAX INT_MAX
|
|
#define PY_SSIZE_T_MIN INT_MIN
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
class LibraryLoader;
|
|
|
|
extern DATA_OBJECT(_Py_NoneStruct)
|
|
extern DATA_OBJECT(_Py_NotImplementedStruct)
|
|
extern DATA_OBJECT(_Py_TrueStruct)
|
|
extern DATA_OBJECT(_Py_ZeroStruct)
|
|
extern DATA_OBJECT(PyString_Type)
|
|
extern DATA_OBJECT(PyList_Type)
|
|
extern DATA_OBJECT(PyLong_Type)
|
|
extern DATA_OBJECT(PyInt_Type)
|
|
extern DATA_OBJECT(PyUnicode_Type)
|
|
extern DATA_OBJECT(PyTuple_Type)
|
|
extern DATA_OBJECT(PyDict_Type)
|
|
|
|
extern DATA_OBJECT(PyExc_SystemError)
|
|
extern DATA_OBJECT(PyExc_ValueError)
|
|
extern DATA_OBJECT(PyExc_Exception)
|
|
extern DATA_OBJECT(PyExc_TypeError)
|
|
extern DATA_OBJECT(PyExc_KeyboardInterrupt)
|
|
extern DATA_OBJECT(PyExc_RuntimeError)
|
|
extern DATA_OBJECT(PyExc_ReferenceError)
|
|
|
|
bool python_load_dll(LibraryLoader& dll);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|