23 #include <sys/types.h> 28 #if !defined(Py_RETURN_NONE) // New in Python 2.4 30 { Py_INCREF(Py_None);
return Py_None; }
31 #define Py_RETURN_NONE return doPy_RETURN_NONE() 34 #if !defined(Py_RETURN_TRUE) // New in Python 2.4 36 {Py_INCREF(Py_True);
return Py_True;}
37 # define Py_RETURN_TRUE return doPy_RETURN_TRUE() 40 #if !defined(Py_RETURN_FALSE) // New in Python 2.4 42 {Py_INCREF(Py_False);
return Py_False;}
43 #define Py_RETURN_FALSE return doPy_RETURN_FALSE() 48 #define python_module(s) ((PyObject *) script_private_get(s)) 50 #define PYTHON_HANDLE_HEADER(event, arg) \ 53 PyObject *pArgs = arg;\ 54 python_handle_result = -1;\ 56 __py_r = PyObject_Call(event, pArgs, NULL);\ 58 if (__py_r && PyInt_Check(__py_r)) { \ 59 python_handle_result = PyInt_AsLong(__py_r); \ 60 } else if (!__py_r) {\ 61 char *err = python_geterror(scr);\ 62 print("script_error", err);\ 66 #define PYTHON_HANDLE_FOOTER() \ static PyObject * doPy_RETURN_TRUE()
Definition: python.h:35
script_t * python_find_script(PyObject *module)
Definition: python.c:341
static PyObject * doPy_RETURN_NONE()
Definition: python.h:29
char * python_geterror(script_t *s)
Definition: python.c:358
Definition: commands.h:63
int python_exec(const char *command)
Definition: python.c:279
PyObject * python_get_func(PyObject *module, const char *name)
Definition: python.c:329
int python_finalize()
Definition: python.c:590
int python_unload(script_t *s)
Definition: python.c:486
int python_run(const char *filename)
Definition: python.c:307
const char * name
Definition: remote.c:88
static PyObject * doPy_RETURN_FALSE()
Definition: python.h:41
int python_load(script_t *s)
Definition: python.c:442
int python_initialize()
Definition: python.c:528
scriptlang_t python_lang
Definition: python.c:46