summaryrefslogtreecommitdiff
path: root/src/plugins/php
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-04-10 21:26:15 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-04-10 21:26:15 +0200
commit3467d6eb430d132ff94e04ad7485d8f705317099 (patch)
treebcf6a9684d2f08c41e50ec95963be55ddb53144a /src/plugins/php
parent9a969c41dbd938f598fd06f2dee8bbd3feafea57 (diff)
downloadweechat-3467d6eb430d132ff94e04ad7485d8f705317099.zip
scripts: return long integer instead of string in function infolist_time
Diffstat (limited to 'src/plugins/php')
-rw-r--r--src/plugins/php/weechat-php-api.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c
index 1bb039556..1801e79b1 100644
--- a/src/plugins/php/weechat-php-api.c
+++ b/src/plugins/php/weechat-php-api.c
@@ -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)