diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-03-01 09:06:18 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-03-01 09:06:18 +0100 |
commit | 5a7059751635abacc0ede10fdedfa1d45c73143e (patch) | |
tree | 18f7f90925c53855390ece88d2839ae1e45fb15e /src/plugins/guile/weechat-guile-api.c | |
parent | 3cd02595755a94dde73c2c358fb9a8c035be41bc (diff) | |
download | weechat-5a7059751635abacc0ede10fdedfa1d45c73143e.zip |
scripts: fix type of value returned by function hdata_time (from string to long integer) in perl/ruby/lua/tcl/guile plugins
Diffstat (limited to 'src/plugins/guile/weechat-guile-api.c')
-rw-r--r-- | src/plugins/guile/weechat-guile-api.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/guile/weechat-guile-api.c b/src/plugins/guile/weechat-guile-api.c index c2318aa46..1e140ed50 100644 --- a/src/plugins/guile/weechat-guile-api.c +++ b/src/plugins/guile/weechat-guile-api.c @@ -4439,22 +4439,17 @@ weechat_guile_api_hdata_pointer (SCM hdata, SCM pointer, SCM name) SCM weechat_guile_api_hdata_time (SCM hdata, SCM pointer, SCM name) { - char timebuffer[64], *result; time_t time; - SCM return_value; - API_INIT_FUNC(1, "hdata_time", API_RETURN_EMPTY); + API_INIT_FUNC(1, "hdata_time", API_RETURN_LONG(0)); if (!scm_is_string (hdata) || !scm_is_string (pointer) || !scm_is_string (name)) - API_WRONG_ARGS(API_RETURN_EMPTY); + API_WRONG_ARGS(API_RETURN_LONG(0)); - timebuffer[0] = '\0'; time = weechat_hdata_time (API_STR2PTR(API_SCM_TO_STRING(hdata)), API_STR2PTR(API_SCM_TO_STRING(pointer)), API_SCM_TO_STRING(name)); - snprintf (timebuffer, sizeof (timebuffer), "%ld", (long int)time); - result = strdup (timebuffer); - API_RETURN_STRING_FREE(result); + API_RETURN_LONG(time); } SCM |