aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/helpers.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-05-23 16:23:34 +0000
committerJustus Winter <[email protected]>2016-05-23 16:23:34 +0000
commit283f0bdc3d32624dac93d02ba3df516e69d8d4ba (patch)
tree4dd2656100ef95e0175fbca1a855c34376d73c15 /lang/python/helpers.c
parentpython: Move edit callback function. (diff)
downloadgpgme-283f0bdc3d32624dac93d02ba3df516e69d8d4ba.tar.gz
gpgme-283f0bdc3d32624dac93d02ba3df516e69d8d4ba.zip
python: Fix hook.
* lang/python/helpers.c (pyProgressCb): Fix getting hook data. * lang/python/tests/t-callbacks.py: Show that this works. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/helpers.c')
-rw-r--r--lang/python/helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lang/python/helpers.c b/lang/python/helpers.c
index e3055741..0ee24a3f 100644
--- a/lang/python/helpers.c
+++ b/lang/python/helpers.c
@@ -235,7 +235,7 @@ static void pyProgressCb(void *hook, const char *what, int type, int current,
self = PyTuple_GetItem(pyhook, 0);
func = PyTuple_GetItem(pyhook, 1);
if (PyTuple_Size(pyhook) == 3) {
- dataarg = PyTuple_GetItem(pyhook, 1);
+ dataarg = PyTuple_GetItem(pyhook, 2);
args = PyTuple_New(5);
} else {
args = PyTuple_New(4);