diff options
Diffstat (limited to 'pcilib/py.h')
-rw-r--r-- | pcilib/py.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pcilib/py.h b/pcilib/py.h index 09e2b87..9703706 100644 --- a/pcilib/py.h +++ b/pcilib/py.h @@ -4,6 +4,7 @@ #include "pcilib.h" typedef struct pcilib_py_s pcilib_py_t; +typedef void pcilib_py_object; #ifdef __cplusplus extern "C" { @@ -15,10 +16,9 @@ void pcilib_free_py(pcilib_t *ctx); int pcilib_py_init_script(pcilib_t *ctx, char* module_name, pcilib_access_mode_t *mode); -int pcilib_py_free_script(char* module_name); -int pcilib_script_read(pcilib_t *ctx, char* module_name, pcilib_value_t *val); -int pcilib_script_write(pcilib_t *ctx, char* module_name, pcilib_value_t *val); - +int pcilib_py_free_script(pcilib_t *ctx,char* module_name); +int pcilib_script_run_func(pcilib_t *ctx, char* module_name, + const char* func_name, pcilib_value_t *val); /*! * \brief Converts pcilib_value_t to PyObject. @@ -26,7 +26,7 @@ int pcilib_script_write(pcilib_t *ctx, char* module_name, pcilib_value_t *val); * \param val pointer to pcilib_value_t to convert * \return PyObject, containing value. NULL with error message, sended to errstream. */ -void* pcilib_get_value_as_pyobject(pcilib_t* ctx, pcilib_value_t *val); +pcilib_py_object* pcilib_get_value_as_pyobject(pcilib_t* ctx, pcilib_value_t *val, int *err); /*! @@ -36,7 +36,7 @@ void* pcilib_get_value_as_pyobject(pcilib_t* ctx, pcilib_value_t *val); * \param val initialized polymorphic value * \return 0 on success or memory error */ -int pcilib_set_value_from_pyobject(pcilib_t* ctx, void* pyVal, pcilib_value_t *val); +int pcilib_set_value_from_pyobject(pcilib_t* ctx, pcilib_value_t *val, pcilib_py_object* pyObjVal); #ifdef __cplusplus |