summaryrefslogtreecommitdiffstats
path: root/pywrap
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2016-03-05 16:16:13 +0100
committerSuren A. Chilingaryan <csa@suren.me>2016-03-05 16:16:13 +0100
commit2f99c578716ebe81ddd266389f3ff614b4595a56 (patch)
tree082932caafc6e3e34f2938402f969cb4944b921f /pywrap
parentffc7b6d717d258a2da8a4392e551111b9e932648 (diff)
downloadpcitool-2f99c578716ebe81ddd266389f3ff614b4595a56.tar.gz
pcitool-2f99c578716ebe81ddd266389f3ff614b4595a56.tar.bz2
pcitool-2f99c578716ebe81ddd266389f3ff614b4595a56.tar.xz
pcitool-2f99c578716ebe81ddd266389f3ff614b4595a56.zip
Handle build.h in releases
Diffstat (limited to 'pywrap')
-rw-r--r--pywrap/pcipywrap.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/pywrap/pcipywrap.c b/pywrap/pcipywrap.c
index 7431604..f656ec6 100644
--- a/pywrap/pcipywrap.c
+++ b/pywrap/pcipywrap.c
@@ -459,22 +459,22 @@ PyObject* pcipywrap_set_property(pcipywrap *self, PyObject* val, const char *pro
PyObject* pcipywrap_get_registers_list(pcipywrap *self, const char *bank)
{
- pcilib_register_info_t *list = pcilib_get_register_list(self->ctx, bank, PCILIB_LIST_FLAGS_DEFAULT);
-
- if(!list) {
- set_python_exception("pcilib_get_register_list return NULL");
- return NULL;
- }
-
- PyObject* pyList = PyList_New(0);
- for(int i = 0; list[i].name; i++)
- {
- //serialize item attributes
- PyObject* pylistItem = pcilib_convert_register_info_to_pyobject(self->ctx, list[i]);
- pcilib_pylist_append(pyList, pylistItem);
- }
- pcilib_free_register_info(self->ctx, list);
- return pyList;
+ pcilib_register_info_t *list = pcilib_get_register_list(self->ctx, bank, PCILIB_LIST_FLAGS_DEFAULT);
+
+ if(!list) {
+ set_python_exception("pcilib_get_register_list return NULL");
+ return NULL;
+ }
+
+ PyObject* pyList = PyList_New(0);
+ for(int i = 0; list[i].name; i++)
+ {
+ //serialize item attributes
+ PyObject* pylistItem = pcilib_convert_register_info_to_pyobject(self->ctx, list[i]);
+ pcilib_pylist_append(pyList, pylistItem);
+ }
+ pcilib_free_register_info(self->ctx, list);
+ return pyList;
}
PyObject* pcipywrap_get_register_info(pcipywrap *self, const char* reg,const char *bank)