mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 21:06:38 +02:00
api: add function completion_set
This commit is contained in:
@@ -4814,6 +4814,26 @@ API_FUNC(completion_get_string)
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(completion_set)
|
||||
{
|
||||
zend_string *z_completion, *z_property, *z_value;
|
||||
struct t_gui_completion *completion;
|
||||
char *property, *value;
|
||||
|
||||
API_INIT_FUNC(1, "completion_set", API_RETURN_ERROR);
|
||||
if (zend_parse_parameters (ZEND_NUM_ARGS(), "SSS", &z_completion,
|
||||
&z_property, &z_value) == FAILURE)
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
|
||||
completion = (struct t_gui_completion *)API_STR2PTR(ZSTR_VAL(z_completion));
|
||||
property = ZSTR_VAL(z_property);
|
||||
value = ZSTR_VAL(z_value);
|
||||
|
||||
weechat_completion_set (completion, (const char *)property, (const char *)value);
|
||||
|
||||
API_RETURN_OK;
|
||||
}
|
||||
|
||||
API_FUNC(completion_list_add)
|
||||
{
|
||||
zend_string *z_completion, *z_word, *z_where;
|
||||
|
||||
@@ -219,6 +219,7 @@ PHP_FUNCTION(weechat_command_options);
|
||||
PHP_FUNCTION(weechat_completion_new);
|
||||
PHP_FUNCTION(weechat_completion_search);
|
||||
PHP_FUNCTION(weechat_completion_get_string);
|
||||
PHP_FUNCTION(weechat_completion_set);
|
||||
PHP_FUNCTION(weechat_completion_list_add);
|
||||
PHP_FUNCTION(weechat_completion_free);
|
||||
PHP_FUNCTION(weechat_info_get);
|
||||
|
||||
@@ -277,6 +277,7 @@ const zend_function_entry weechat_functions[] = {
|
||||
PHP_FE(weechat_completion_new, arginfo_weechat_completion_new)
|
||||
PHP_FE(weechat_completion_search, arginfo_weechat_completion_search)
|
||||
PHP_FE(weechat_completion_get_string, arginfo_weechat_completion_get_string)
|
||||
PHP_FE(weechat_completion_set, arginfo_weechat_completion_set)
|
||||
PHP_FE(weechat_completion_list_add, arginfo_weechat_completion_list_add)
|
||||
PHP_FE(weechat_completion_free, arginfo_weechat_completion_free)
|
||||
PHP_FE(weechat_info_get, arginfo_weechat_info_get)
|
||||
|
||||
@@ -185,6 +185,7 @@ function weechat_command_options(string $p0, string $p1, array $p2): int {}
|
||||
function weechat_completion_new(string $p0): string {}
|
||||
function weechat_completion_search(string $p0, string $p1, int $p2, int $p3): int {}
|
||||
function weechat_completion_get_string(string $p0, string $p1): string {}
|
||||
function weechat_completion_set(string $p0, string $p1, string $p2): int {}
|
||||
function weechat_completion_list_add(string $p0, string $p1, int $p2, string $p3): int {}
|
||||
function weechat_completion_free(string $p0): int {}
|
||||
function weechat_info_get(string $p0, string $p1): string {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: ac17ccd00483eea80bd3dc22ec07ab3bf41dec88 */
|
||||
* Stub hash: b20e387bfdf7c5496a25b4a07f5d3eed456f7992 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_weechat_register, 0, 7, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, p0, IS_STRING, 0)
|
||||
@@ -539,6 +539,8 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_weechat_completion_get_string arginfo_weechat_iconv_to_internal
|
||||
|
||||
#define arginfo_weechat_completion_set arginfo_weechat_config_write_line
|
||||
|
||||
#define arginfo_weechat_completion_list_add arginfo_weechat_hook_completion_list_add
|
||||
|
||||
#define arginfo_weechat_completion_free arginfo_weechat_charset_set
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: ac17ccd00483eea80bd3dc22ec07ab3bf41dec88 */
|
||||
* Stub hash: b20e387bfdf7c5496a25b4a07f5d3eed456f7992 */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_weechat_register, 0, 0, 7)
|
||||
ZEND_ARG_INFO(0, p0)
|
||||
@@ -385,6 +385,8 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_weechat_completion_get_string arginfo_weechat_iconv_to_internal
|
||||
|
||||
#define arginfo_weechat_completion_set arginfo_weechat_ngettext
|
||||
|
||||
#define arginfo_weechat_completion_list_add arginfo_weechat_string_eval_expression
|
||||
|
||||
#define arginfo_weechat_completion_free arginfo_weechat_plugin_get_name
|
||||
|
||||
Reference in New Issue
Block a user