mirror of
https://github.com/weechat/weechat.git
synced 2026-07-04 08:43:13 +02:00
core: add type char for hdata and function hdata_char in plugin/script API
This commit is contained in:
@@ -4855,6 +4855,28 @@ weechat_guile_api_hdata_move (SCM hdata, SCM pointer, SCM count)
|
||||
API_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_guile_api_hdata_char: get char value of a variable in structure
|
||||
* using hdata
|
||||
*/
|
||||
|
||||
SCM
|
||||
weechat_guile_api_hdata_char (SCM hdata, SCM pointer, SCM name)
|
||||
{
|
||||
int value;
|
||||
|
||||
API_FUNC(1, "hdata_char", API_RETURN_INT(0));
|
||||
if (!scm_is_string (hdata) || !scm_is_string (pointer)
|
||||
|| !scm_is_string (name))
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
value = (int)weechat_hdata_char (script_str2ptr (scm_i_string_chars (hdata)),
|
||||
script_str2ptr (scm_i_string_chars (pointer)),
|
||||
scm_i_string_chars (name));
|
||||
|
||||
API_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_guile_api_hdata_integer: get integer value of a variable in structure
|
||||
* using hdata
|
||||
@@ -5312,6 +5334,7 @@ weechat_guile_api_module_init (void *data)
|
||||
scm_c_define_gsubr ("weechat:hdata_get_var_hdata", 2, 0, 0, &weechat_guile_api_hdata_get_var_hdata);
|
||||
scm_c_define_gsubr ("weechat:hdata_get_list", 2, 0, 0, &weechat_guile_api_hdata_get_list);
|
||||
scm_c_define_gsubr ("weechat:hdata_move", 3, 0, 0, &weechat_guile_api_hdata_move);
|
||||
scm_c_define_gsubr ("weechat:hdata_char", 3, 0, 0, &weechat_guile_api_hdata_char);
|
||||
scm_c_define_gsubr ("weechat:hdata_integer", 3, 0, 0, &weechat_guile_api_hdata_integer);
|
||||
scm_c_define_gsubr ("weechat:hdata_long", 3, 0, 0, &weechat_guile_api_hdata_long);
|
||||
scm_c_define_gsubr ("weechat:hdata_string", 3, 0, 0, &weechat_guile_api_hdata_string);
|
||||
|
||||
Reference in New Issue
Block a user