diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 0d1600685..b51464ccf 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -35,6 +35,7 @@ Bug fixes:: * irc: add missing tags on self action messages when capability echo-message is enabled (issue #2074) * irc: don't strip monospace color code 0x11 from incoming messages (issue #2073) * irc: fix random date displayed when a received message contains tags but no "time" (issue #2064) + * python: fix truncation of unsigned long long integer returned by function string_parse_size * script: always display list of scripts when searching scripts with `/script search` (issue #2077) * script: fix default mouse keys (issue #2076) * scripts: fix crash on script unload when a hook is created in a buffer close callback (issue #2067) diff --git a/src/plugins/python/weechat-python-api.c b/src/plugins/python/weechat-python-api.c index 5cc1ac5f7..068981bdd 100644 --- a/src/plugins/python/weechat-python-api.c +++ b/src/plugins/python/weechat-python-api.c @@ -80,8 +80,8 @@ return PyLong_FromLong ((long)__int) #define API_RETURN_LONG(__long) \ return PyLong_FromLong (__long) -#define API_RETURN_LONGLONG(__longlong) \ - return PyLong_FromLongLong (__longlong) +#define API_RETURN_ULONGLONG(__ulonglong) \ + return PyLong_FromUnsignedLongLong (__ulonglong) /* @@ -376,14 +376,14 @@ API_FUNC(string_parse_size) char *size; unsigned long long value; - API_INIT_FUNC(1, "string_parse_size", API_RETURN_LONGLONG(0)); + API_INIT_FUNC(1, "string_parse_size", API_RETURN_ULONGLONG(0)); size = NULL; if (!PyArg_ParseTuple (args, "s", &size)) - API_WRONG_ARGS(API_RETURN_LONGLONG(0)); + API_WRONG_ARGS(API_RETURN_ULONGLONG(0)); value = weechat_string_parse_size (size); - API_RETURN_LONGLONG(value); + API_RETURN_ULONGLONG(value); } API_FUNC(string_color_code_size)