summaryrefslogtreecommitdiffstats
path: root/pcilib/py.c
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-02-11 12:28:37 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-02-11 12:28:37 +0100
commit76ee5a167add1c169a982ab59aa0544f827cb365 (patch)
treebd10c0f170bdf2f68d258115145d5d39c075fa8a /pcilib/py.c
parentf526c4a5a3e4f35bb1c4b03af1f3244a8c0db48a (diff)
downloadpcitool-76ee5a167add1c169a982ab59aa0544f827cb365.tar.gz
pcitool-76ee5a167add1c169a982ab59aa0544f827cb365.tar.bz2
pcitool-76ee5a167add1c169a982ab59aa0544f827cb365.tar.xz
pcitool-76ee5a167add1c169a982ab59aa0544f827cb365.zip
Solve errors in serialing register_info function. Clear unused code
Diffstat (limited to 'pcilib/py.c')
-rw-r--r--pcilib/py.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/pcilib/py.c b/pcilib/py.c
index acc18df..57a5f46 100644
--- a/pcilib/py.c
+++ b/pcilib/py.c
@@ -269,9 +269,7 @@ int pcilib_convert_pyobject_to_val(pcilib_t* ctx, void* pyObjVal, pcilib_value_t
}
int pcilib_init_py_script(pcilib_t *ctx, char* module_name, pcilib_script_t **module, pcilib_access_mode_t *mode)
-{
- int err;
-
+{
//Initialize python script, if it has not initialized already.
if(!module_name)
{
@@ -389,6 +387,8 @@ int pcilib_free_py_script(pcilib_script_t *module)
module->py_script_module = NULL;
}
}
+
+ return 0;
}
int pcilib_script_read(pcilib_t *ctx, pcilib_script_t *module, pcilib_value_t *val)
@@ -415,9 +415,7 @@ int pcilib_script_read(pcilib_t *ctx, pcilib_script_t *module, pcilib_value_t *v
}
int pcilib_script_write(pcilib_t *ctx, pcilib_script_t *module, pcilib_value_t *val)
-{
- int err;
-
+{
PyObject *input = pcilib_convert_val_to_pyobject(ctx, val);
if(!input)
{