]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
fix radio button selection check in snack
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 27 May 2019 11:34:54 +0000 (13:34 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 27 May 2019 11:35:34 +0000 (13:35 +0200)
https://pagure.io/newt/issue/1

snack.c

diff --git a/snack.c b/snack.c
index 880a4317b01f9d8c36ecf84c4992145a221f6135..c253f0c6aedffe517456eb55f5e3c27687a5badf 100644 (file)
--- a/snack.c
+++ b/snack.c
@@ -1096,7 +1096,11 @@ static PyObject * widget_get_radioValue(PyObject *self, void *closure)
 {
        snackWidget *w = (snackWidget *)self;
 
-       return Py_BuildValue("i", newtRadioGetCurrent(w->co));
+#if SIZEOF_VOID_P <= SIZEOF_LONG
+       return Py_BuildValue("l", (long)newtRadioGetCurrent(w->co));
+#else
+       return Py_BuildValue("L", (long long)newtRadioGetCurrent(w->co));
+#endif
 }
 
 static void widgetDestructor(PyObject * o) {