mirror of
https://github.com/weechat/weechat.git
synced 2026-06-24 03:46:39 +02:00
python: fix read of return value for callbacks returning an integer in Python 2.x (closes #125)
This commit is contained in:
@@ -34,6 +34,14 @@
|
||||
#define PyUnicode_FromString PyString_FromString
|
||||
#endif
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
/* check of integer with Python >= 3.x */
|
||||
#define PY_INTEGER_CHECK(x) (PyLong_Check(x))
|
||||
#else
|
||||
/* check of integer with Python <= 2.x */
|
||||
#define PY_INTEGER_CHECK(x) (PyInt_Check(x) || PyLong_Check(x))
|
||||
#endif
|
||||
|
||||
extern struct t_weechat_plugin *weechat_python_plugin;
|
||||
|
||||
extern int python_quiet;
|
||||
|
||||
Reference in New Issue
Block a user