mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 21:06:38 +02:00
api: add functions config_{boolean|integer|string|color|enum}_inherited in scripting API
This commit is contained in:
@@ -1679,6 +1679,23 @@ API_FUNC(config_boolean_default)
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_boolean_inherited)
|
||||
{
|
||||
zend_string *z_option;
|
||||
struct t_config_option *option;
|
||||
int result;
|
||||
|
||||
API_INIT_FUNC(1, "config_boolean_inherited", API_RETURN_INT(0));
|
||||
if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_option) == FAILURE)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
option = (struct t_config_option *)API_STR2PTR(ZSTR_VAL(z_option));
|
||||
|
||||
result = weechat_config_boolean_inherited (option);
|
||||
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_integer)
|
||||
{
|
||||
zend_string *z_option;
|
||||
@@ -1713,6 +1730,23 @@ API_FUNC(config_integer_default)
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_integer_inherited)
|
||||
{
|
||||
zend_string *z_option;
|
||||
struct t_config_option *option;
|
||||
int result;
|
||||
|
||||
API_INIT_FUNC(1, "config_integer_inherited", API_RETURN_INT(0));
|
||||
if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_option) == FAILURE)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
option = (struct t_config_option *)API_STR2PTR(ZSTR_VAL(z_option));
|
||||
|
||||
result = weechat_config_integer_inherited (option);
|
||||
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_string)
|
||||
{
|
||||
zend_string *z_option;
|
||||
@@ -1747,6 +1781,23 @@ API_FUNC(config_string_default)
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_string_inherited)
|
||||
{
|
||||
zend_string *z_option;
|
||||
struct t_config_option *option;
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "config_string_inherited", API_RETURN_EMPTY);
|
||||
if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_option) == FAILURE)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
option = (struct t_config_option *)API_STR2PTR(ZSTR_VAL(z_option));
|
||||
|
||||
result = weechat_config_string_inherited (option);
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_color)
|
||||
{
|
||||
zend_string *z_option;
|
||||
@@ -1781,6 +1832,23 @@ API_FUNC(config_color_default)
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_color_inherited)
|
||||
{
|
||||
zend_string *z_option;
|
||||
struct t_config_option *option;
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "config_color_inherited", API_RETURN_EMPTY);
|
||||
if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_option) == FAILURE)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
option = (struct t_config_option *)API_STR2PTR(ZSTR_VAL(z_option));
|
||||
|
||||
result = weechat_config_color_inherited (option);
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_enum)
|
||||
{
|
||||
zend_string *z_option;
|
||||
@@ -1815,6 +1883,23 @@ API_FUNC(config_enum_default)
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_enum_inherited)
|
||||
{
|
||||
zend_string *z_option;
|
||||
struct t_config_option *option;
|
||||
int result;
|
||||
|
||||
API_INIT_FUNC(1, "config_enum_inherited", API_RETURN_INT(0));
|
||||
if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_option) == FAILURE)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
option = (struct t_config_option *)API_STR2PTR(ZSTR_VAL(z_option));
|
||||
|
||||
result = weechat_config_enum_inherited (option);
|
||||
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_write_option)
|
||||
{
|
||||
zend_string *z_config_file, *z_option;
|
||||
|
||||
@@ -102,14 +102,19 @@ PHP_FUNCTION(weechat_config_option_is_null);
|
||||
PHP_FUNCTION(weechat_config_option_default_is_null);
|
||||
PHP_FUNCTION(weechat_config_boolean);
|
||||
PHP_FUNCTION(weechat_config_boolean_default);
|
||||
PHP_FUNCTION(weechat_config_boolean_inherited);
|
||||
PHP_FUNCTION(weechat_config_integer);
|
||||
PHP_FUNCTION(weechat_config_integer_default);
|
||||
PHP_FUNCTION(weechat_config_integer_inherited);
|
||||
PHP_FUNCTION(weechat_config_string);
|
||||
PHP_FUNCTION(weechat_config_string_default);
|
||||
PHP_FUNCTION(weechat_config_string_inherited);
|
||||
PHP_FUNCTION(weechat_config_color);
|
||||
PHP_FUNCTION(weechat_config_color_default);
|
||||
PHP_FUNCTION(weechat_config_color_inherited);
|
||||
PHP_FUNCTION(weechat_config_enum);
|
||||
PHP_FUNCTION(weechat_config_enum_default);
|
||||
PHP_FUNCTION(weechat_config_enum_inherited);
|
||||
PHP_FUNCTION(weechat_config_write_option);
|
||||
PHP_FUNCTION(weechat_config_write_line);
|
||||
PHP_FUNCTION(weechat_config_write);
|
||||
|
||||
@@ -160,14 +160,19 @@ const zend_function_entry weechat_functions[] = {
|
||||
PHP_FE(weechat_config_option_default_is_null, arginfo_weechat_config_option_default_is_null)
|
||||
PHP_FE(weechat_config_boolean, arginfo_weechat_config_boolean)
|
||||
PHP_FE(weechat_config_boolean_default, arginfo_weechat_config_boolean_default)
|
||||
PHP_FE(weechat_config_boolean_inherited, arginfo_weechat_config_boolean_inherited)
|
||||
PHP_FE(weechat_config_integer, arginfo_weechat_config_integer)
|
||||
PHP_FE(weechat_config_integer_default, arginfo_weechat_config_integer_default)
|
||||
PHP_FE(weechat_config_integer_inherited, arginfo_weechat_config_integer_inherited)
|
||||
PHP_FE(weechat_config_string, arginfo_weechat_config_string)
|
||||
PHP_FE(weechat_config_string_default, arginfo_weechat_config_string_default)
|
||||
PHP_FE(weechat_config_string_inherited, arginfo_weechat_config_string_inherited)
|
||||
PHP_FE(weechat_config_color, arginfo_weechat_config_color)
|
||||
PHP_FE(weechat_config_color_default, arginfo_weechat_config_color_default)
|
||||
PHP_FE(weechat_config_color_inherited, arginfo_weechat_config_color_inherited)
|
||||
PHP_FE(weechat_config_enum, arginfo_weechat_config_enum)
|
||||
PHP_FE(weechat_config_enum_default, arginfo_weechat_config_enum_default)
|
||||
PHP_FE(weechat_config_enum_inherited, arginfo_weechat_config_enum_inherited)
|
||||
PHP_FE(weechat_config_write_option, arginfo_weechat_config_write_option)
|
||||
PHP_FE(weechat_config_write_line, arginfo_weechat_config_write_line)
|
||||
PHP_FE(weechat_config_write, arginfo_weechat_config_write)
|
||||
|
||||
@@ -68,14 +68,19 @@ function weechat_config_option_is_null(string $p0): int {}
|
||||
function weechat_config_option_default_is_null(string $p0): int {}
|
||||
function weechat_config_boolean(string $p0): int {}
|
||||
function weechat_config_boolean_default(string $p0): int {}
|
||||
function weechat_config_boolean_inherited(string $p0): int {}
|
||||
function weechat_config_integer(string $p0): int {}
|
||||
function weechat_config_integer_default(string $p0): int {}
|
||||
function weechat_config_integer_inherited(string $p0): int {}
|
||||
function weechat_config_string(string $p0): string {}
|
||||
function weechat_config_string_default(string $p0): string {}
|
||||
function weechat_config_string_inherited(string $p0): string {}
|
||||
function weechat_config_color(string $p0): string {}
|
||||
function weechat_config_color_default(string $p0): string {}
|
||||
function weechat_config_color_inherited(string $p0): string {}
|
||||
function weechat_config_enum(string $p0): int {}
|
||||
function weechat_config_enum_default(string $p0): int {}
|
||||
function weechat_config_enum_inherited(string $p0): int {}
|
||||
function weechat_config_write_option(string $p0, string $p1): int {}
|
||||
function weechat_config_write_line(string $p0, string $p1, string $p2): int {}
|
||||
function weechat_config_write(string $p0): int {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 2c52caa5a78009856a6e6ced63555d1b1e2be0fe */
|
||||
* Stub hash: 59292da89eab98ef1f615c173d9722b9fdafad80 */
|
||||
|
||||
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)
|
||||
@@ -173,22 +173,32 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_weechat_config_boolean_default arginfo_weechat_charset_set
|
||||
|
||||
#define arginfo_weechat_config_boolean_inherited arginfo_weechat_charset_set
|
||||
|
||||
#define arginfo_weechat_config_integer arginfo_weechat_charset_set
|
||||
|
||||
#define arginfo_weechat_config_integer_default arginfo_weechat_charset_set
|
||||
|
||||
#define arginfo_weechat_config_integer_inherited arginfo_weechat_charset_set
|
||||
|
||||
#define arginfo_weechat_config_string arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_string_default arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_string_inherited arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_color arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_color_default arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_color_inherited arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_enum arginfo_weechat_charset_set
|
||||
|
||||
#define arginfo_weechat_config_enum_default arginfo_weechat_charset_set
|
||||
|
||||
#define arginfo_weechat_config_enum_inherited arginfo_weechat_charset_set
|
||||
|
||||
#define arginfo_weechat_config_write_option arginfo_weechat_string_has_highlight
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_weechat_config_write_line, 0, 3, IS_LONG, 0)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 2c52caa5a78009856a6e6ced63555d1b1e2be0fe */
|
||||
* Stub hash: 59292da89eab98ef1f615c173d9722b9fdafad80 */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_weechat_register, 0, 0, 7)
|
||||
ZEND_ARG_INFO(0, p0)
|
||||
@@ -138,22 +138,32 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_weechat_config_boolean_default arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_boolean_inherited arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_integer arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_integer_default arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_integer_inherited arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_string arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_string_default arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_string_inherited arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_color arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_color_default arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_color_inherited arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_enum arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_enum_default arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_enum_inherited arginfo_weechat_plugin_get_name
|
||||
|
||||
#define arginfo_weechat_config_write_option arginfo_weechat_iconv_to_internal
|
||||
|
||||
#define arginfo_weechat_config_write_line arginfo_weechat_ngettext
|
||||
|
||||
Reference in New Issue
Block a user