mirror of
https://github.com/hexchat/hexchat.git
synced 2024-11-05 10:42:33 +01:00
python: Fix get_pluginpref()
This relied on undocumented behavior of hexchat_pluginpref_get_int() that has been fixed recently. -1 is the correct failure value.
This commit is contained in:
parent
034624983b
commit
9d74ceedfd
@ -1849,7 +1849,7 @@ Module_hexchat_pluginpref_get(PyObject *self, PyObject *args)
|
|||||||
BEGIN_XCHAT_CALLS(NONE);
|
BEGIN_XCHAT_CALLS(NONE);
|
||||||
retint = hexchat_pluginpref_get_int(prefph, var);
|
retint = hexchat_pluginpref_get_int(prefph, var);
|
||||||
END_XCHAT_CALLS();
|
END_XCHAT_CALLS();
|
||||||
if ((retint == 0) && (strcmp(retstr, "0") != 0))
|
if ((retint == -1) && (strcmp(retstr, "-1") != 0))
|
||||||
ret = PyUnicode_FromString(retstr);
|
ret = PyUnicode_FromString(retstr);
|
||||||
else
|
else
|
||||||
ret = PyLong_FromLong(retint);
|
ret = PyLong_FromLong(retint);
|
||||||
|
Loading…
Reference in New Issue
Block a user