diff options
author | Vasilii Chernov <vchernov@inr.ru> | 2016-02-08 12:09:58 +0100 |
---|---|---|
committer | Vasilii Chernov <vchernov@inr.ru> | 2016-02-08 12:09:58 +0100 |
commit | aaac7b80d1e003a3dbc4fe0f831a68e5449c846d (patch) | |
tree | 49bedd6eecc04314bdf6add9a65ab8fa86b14a6a /pcilib | |
parent | e10e102b8b0ff3bf35f16b5276d56059d242e1fd (diff) | |
download | pcitool-aaac7b80d1e003a3dbc4fe0f831a68e5449c846d.tar.gz pcitool-aaac7b80d1e003a3dbc4fe0f831a68e5449c846d.tar.bz2 pcitool-aaac7b80d1e003a3dbc4fe0f831a68e5449c846d.tar.xz pcitool-aaac7b80d1e003a3dbc4fe0f831a68e5449c846d.zip |
Add pcipywrap.h to repository
Diffstat (limited to 'pcilib')
-rw-r--r-- | pcilib/pcipywrap.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pcilib/pcipywrap.h b/pcilib/pcipywrap.h new file mode 100644 index 0000000..c2bb749 --- /dev/null +++ b/pcilib/pcipywrap.h @@ -0,0 +1,25 @@ +#ifndef _PCITOOL_PCIPYWRAP_H +#define _PCITOOL_PCIPYWRAP_H +#include <Python.h> +#include "pcilib.h" + +/*! + * \brief Converts pcilib_value_t to PyObject. + * \param ctx pointer to pcilib_t context + * \param val pointer to pcilib_value_t to convert + * \return PyObject, containing value. NULL with error message, sended to errstream. + */ +PyObject* pcilib_convert_val_to_pyobject(pcilib_t* ctx, pcilib_value_t *val, void (*errstream)(const char* msg, ...)); + + +/*! + * \brief Converts PyObject to pcilib_value_t. + * \param ctx pcilib context + * \param pyVal python object, containing value + * \param val initialized polymorphic value + * \return 0 on success or memory error + */ +int pcilib_convert_pyobject_to_val(pcilib_t* ctx, PyObject* pyVal, pcilib_value_t *val); + + +#endif /* _PCITOOL_PCIPYWRAP_H */ |