/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/pcipywrap.h

  • Committer: Vasilii Chernov
  • Date: 2016-02-11 11:00:54 UTC
  • mto: This revision was merged to the branch mainline in revision 353.
  • Revision ID: vchernov@inr.ru-20160211110054-h6x2oxdx1dqaekhe
Change error logging method in Python wrap. Move functions, that converts values between PyObject and pcilib_value_t to py.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _PCITOOL_PCIPYWRAP_H
2
 
#define _PCITOOL_PCIPYWRAP_H
3
 
#include <Python.h>
4
 
#include "pcilib.h"
5
 
 
6
 
/*!
7
 
 * \brief Converts pcilib_value_t to PyObject.
8
 
 * \param ctx pointer to pcilib_t context
9
 
 * \param val pointer to pcilib_value_t to convert
10
 
 * \return PyObject, containing value. NULL with error message, sended to errstream.
11
 
 */
12
 
PyObject* pcilib_convert_val_to_pyobject(pcilib_t* ctx, pcilib_value_t *val, void (*errstream)(const char* msg, ...));
13
 
 
14
 
 
15
 
/*!
16
 
 * \brief Converts PyObject to pcilib_value_t.
17
 
 * \param ctx pcilib context
18
 
 * \param pyVal python object, containing value
19
 
 * \param val initialized polymorphic value
20
 
 * \return 0 on success or memory error
21
 
 */
22
 
int pcilib_convert_pyobject_to_val(pcilib_t* ctx, PyObject* pyVal, pcilib_value_t *val);
23
 
 
24
 
 
25
 
#endif /* _PCITOOL_PCIPYWRAP_H */