diff options
Diffstat (limited to 'src/plugins/php/weechat-php-api.c')
-rw-r--r-- | src/plugins/php/weechat-php-api.c | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c index bc6328f42..43ec87cab 100644 --- a/src/plugins/php/weechat-php-api.c +++ b/src/plugins/php/weechat-php-api.c @@ -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; |