From: Miroslav Lichvar Date: Mon, 27 May 2019 11:34:54 +0000 (+0200) Subject: fix radio button selection check in snack X-Git-Tag: r0-52-21~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ddc56f06b629aad44d0cf7e9d15a5cc1114b72c9;p=thirdparty%2Fnewt.git fix radio button selection check in snack https://pagure.io/newt/issue/1 --- diff --git a/snack.c b/snack.c index 880a431..c253f0c 100644 --- 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) {