Go to the documentation of this file.
29 #ifndef PLUGIN_PYTHON_H
30 #define PLUGIN_PYTHON_H
49 #if PY_MAJOR_VERSION >= 3
50 # if PY_MINOR_VERSION >= 3
53 # if PY_MINOR_VERSION >= 8
56 # if PY_MINOR_VERSION >= 9
59 # if PY_MINOR_VERSION >= 10
65 #define CF_IS_PYSTR(cfpy_obj) (PyUnicode_Check(cfpy_obj))
71 # ifdef PYTHON_PLUGIN_EXPORTS
72 # define MODULEAPI __declspec(dllexport)
74 # define MODULEAPI __declspec(dllimport)
77 #ifdef HAVE_VISIBILITY
78 # define MODULEAPI __attribute__((visibility("default")))
84 #define PLUGIN_NAME "Python"
85 #define PLUGIN_VERSION "CFPython Plugin 2.0a13 (Fido)"
149 #if PY_VERSION_HEX == 0x030503F0
150 #define CF_PYTHON_OBJECT(NAME, DEALLOC, CONVERT, HASH, FLAGS, DOC, CMP, METHODS, GETSET, BASE, OBNEW) \
151 PyTypeObject Crossfire_ ## NAME ## Type = { \
153 PyVarObject_HEAD_INIT(NULL, 0) \
154 "Crossfire." #NAME, \
155 sizeof(Crossfire_ ## NAME), \
169 PyObject_GenericGetAttr, \
170 PyObject_GenericSetAttr, \
202 #elif PY_VERSION_HEX == 0x030902F0
203 #define CF_PYTHON_OBJECT(NAME, DEALLOC, CONVERT, HASH, FLAGS, DOC, CMP, METHODS, GETSET, BASE, OBNEW) \
204 PyTypeObject Crossfire_ ## NAME ## Type = { \
206 PyVarObject_HEAD_INIT(NULL, 0) \
207 "Crossfire." #NAME, \
208 sizeof(Crossfire_ ## NAME), \
222 PyObject_GenericGetAttr, \
223 PyObject_GenericSetAttr, \
257 #define CF_PYTHON_OBJECT(NAME, DEALLOC, CONVERT, HASH, FLAGS, DOC, CMP, METHODS, GETSET, BASE, OBNEW) \
258 PyTypeObject Crossfire_ ## NAME ## Type = { \
260 PyVarObject_HEAD_INIT(NULL, 0) \
261 "Crossfire." #NAME, \
262 sizeof(Crossfire_ ## NAME), \
276 PyObject_GenericGetAttr, \
277 PyObject_GenericSetAttr, \
315 #if PY_VERSION_HEX == 0x030503F0 || PY_VERSION_HEX == 0x030902F0
316 #define CF_PYTHON_NUMBER_METHODS(NAME, LONG) \
317 static PyNumberMethods NAME ## Convert = { \
360 #define CF_PYTHON_NUMBER_METHODS(NAME, LONG) \
361 static PyNumberMethods NAME ## Convert = { \
const CFConstant cstReplyTypes[]
const CFConstant cstDirection[]
const CFConstant cstEventType[]
const CFConstant cstMove[]
void(* f_plug_api)(int *type,...)
CFPContext * current_context
const CFConstant cstType[]
const CFConstant cstTime[]
CFPContext * context_stack
const CFConstant cstAttackType[]
const CFConstant cstAttackTypeNumber[]
PyMethodDef CFPythonMethods[]
const CFConstant cstMessageFlag[]
const CFConstant cstAttackMovement[]