mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
python: fix truncation of unsigned long long integer returned by function string_parse_size
This commit is contained in:
@@ -17,6 +17,7 @@ Bug fixes::
|
||||
|
||||
* core: add missing mouse events "alt-ctrl-button2" and "alt-ctrl-button3"
|
||||
* irc: add missing tags on self action messages when capability echo-message is enabled (issue #2074)
|
||||
* 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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user