1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

scripts: return long integer instead of string in function infolist_time

This commit is contained in:
Sébastien Helleu
2018-04-10 21:26:15 +02:00
parent 9a969c41db
commit 3467d6eb43
9 changed files with 33 additions and 98 deletions
+6 -5
View File
@@ -4422,18 +4422,19 @@ API_FUNC(infolist_time)
zend_string *z_infolist, *z_var;
struct t_infolist *infolist;
char *var;
time_t result;
time_t time;
API_INIT_FUNC(1, "infolist_time", API_RETURN_EMPTY);
API_INIT_FUNC(1, "infolist_time", API_RETURN_LONG(0));
if (zend_parse_parameters (ZEND_NUM_ARGS(),
"SS", &z_infolist, &z_var) == FAILURE)
API_WRONG_ARGS(API_RETURN_EMPTY);
API_WRONG_ARGS(API_RETURN_LONG(0));
infolist = (struct t_infolist *)API_STR2PTR(ZSTR_VAL(z_infolist));
var = ZSTR_VAL(z_var);
result = weechat_infolist_time (infolist, (const char *)var);
API_RETURN_INT(result);
time = weechat_infolist_time (infolist, (const char *)var);
API_RETURN_LONG(time);
}
API_FUNC(infolist_free)