1
0
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:
Sébastien Helleu
2024-02-25 17:07:11 +01:00
parent 65cdc2603a
commit 6b1d55203b
2 changed files with 6 additions and 5 deletions
+1
View File
@@ -16,6 +16,7 @@ For a list of important changes that require manual actions, please look at rele
Bug fixes::
* core: add missing mouse events "alt-ctrl-button2" and "alt-ctrl-button3"
* 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)
* tcl: fix truncation of long integer returned by function hdata_long
* trigger: fix memory leak when adding a new trigger with `/trigger` command
+5 -5
View File
@@ -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)