From 2f99c578716ebe81ddd266389f3ff614b4595a56 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 5 Mar 2016 16:16:13 +0100 Subject: Handle build.h in releases --- pywrap/pcipywrap.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'pywrap') 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) -- cgit v1.2.3