mirror of
https://github.com/weechat/weechat.git
synced 2026-06-18 00:54:47 +02:00
scripts: fix function string_parse_size on 32-bit systems (python and ruby) (issue #1999)
This commit is contained in:
@@ -80,6 +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)
|
||||
|
||||
|
||||
/*
|
||||
@@ -374,14 +376,14 @@ API_FUNC(string_parse_size)
|
||||
char *size;
|
||||
unsigned long long value;
|
||||
|
||||
API_INIT_FUNC(1, "string_parse_size", API_RETURN_LONG(0));
|
||||
API_INIT_FUNC(1, "string_parse_size", API_RETURN_LONGLONG(0));
|
||||
size = NULL;
|
||||
if (!PyArg_ParseTuple (args, "s", &size))
|
||||
API_WRONG_ARGS(API_RETURN_LONG(0));
|
||||
API_WRONG_ARGS(API_RETURN_LONGLONG(0));
|
||||
|
||||
value = weechat_string_parse_size (size);
|
||||
|
||||
API_RETURN_LONG(value);
|
||||
API_RETURN_LONGLONG(value);
|
||||
}
|
||||
|
||||
API_FUNC(string_color_code_size)
|
||||
|
||||
Reference in New Issue
Block a user