summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-10-31 11:56:22 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-10-31 11:56:22 +0100
commite442182a9683a713d3d97b452b4361ee0cd1d9a5 (patch)
treec0f60479032a364dea7b5041b51c7c6f5cf13f90 /src/plugins
parentfdc5fa1b14f27741b8242538a106622330769e85 (diff)
downloadweechat-e442182a9683a713d3d97b452b4361ee0cd1d9a5.zip
Remove unneeded assignments in ruby and lua API functions
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/scripts/lua/weechat-lua-api.c564
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby-api.c392
2 files changed, 21 insertions, 935 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c
index 07db5db24..5bf9f15d5 100644
--- a/src/plugins/scripts/lua/weechat-lua-api.c
+++ b/src/plugins/scripts/lua/weechat-lua-api.c
@@ -75,16 +75,8 @@ weechat_lua_api_register (lua_State *L)
lua_current_script = NULL;
lua_registered_script = NULL;
- name = NULL;
- author = NULL;
- version = NULL;
- license = NULL;
- description = NULL;
- shutdown_func = NULL;
- charset = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 7)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(lua_current_script_filename, "register");
@@ -160,8 +152,6 @@ weechat_lua_api_plugin_get_name (lua_State *L)
LUA_RETURN_EMPTY;
}
- plugin = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -196,10 +186,8 @@ weechat_lua_api_charset_set (lua_State *L)
LUA_RETURN_ERROR;
}
- charset = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 1)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "charset_set");
@@ -234,11 +222,8 @@ weechat_lua_api_iconv_to_internal (lua_State *L)
LUA_RETURN_EMPTY;
}
- charset = NULL;
- string = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "iconv_to_internal");
@@ -274,11 +259,8 @@ weechat_lua_api_iconv_from_internal (lua_State *L)
LUA_RETURN_EMPTY;
}
- charset = NULL;
- string = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "iconv_from_internal");
@@ -312,10 +294,8 @@ weechat_lua_api_gettext (lua_State *L)
LUA_RETURN_EMPTY;
}
- string = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 1)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "gettext");
@@ -348,12 +328,8 @@ weechat_lua_api_ngettext (lua_State *L)
LUA_RETURN_EMPTY;
}
- single = NULL;
- plural = NULL;
- count = 0;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "ngettext");
@@ -390,10 +366,6 @@ weechat_lua_api_string_match (lua_State *L)
LUA_RETURN_INT(0);
}
- string = NULL;
- mask = NULL;
- case_sensitive = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -434,9 +406,6 @@ weechat_lua_api_string_has_highlight (lua_State *L)
LUA_RETURN_INT(0);
}
- string = NULL;
- highlight_words = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -476,8 +445,6 @@ weechat_lua_api_string_mask_to_regex (lua_State *L)
LUA_RETURN_EMPTY;
}
- mask = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -513,8 +480,6 @@ weechat_lua_api_string_remove_color (lua_State *L)
LUA_RETURN_EMPTY;
}
- string = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -551,8 +516,6 @@ weechat_lua_api_string_is_command_char (lua_State *L)
LUA_RETURN_INT(0);
}
- string = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -589,8 +552,6 @@ weechat_lua_api_string_input_for_buffer (lua_State *L)
LUA_RETURN_EMPTY;
}
- string = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -625,11 +586,8 @@ weechat_lua_api_mkdir_home (lua_State *L)
LUA_RETURN_ERROR;
}
- directory = NULL;
- mode = 0;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "mkdir_home");
@@ -664,11 +622,8 @@ weechat_lua_api_mkdir (lua_State *L)
LUA_RETURN_ERROR;
}
- directory = NULL;
- mode = 0;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "mkdir");
@@ -704,11 +659,8 @@ weechat_lua_api_mkdir_parents (lua_State *L)
LUA_RETURN_ERROR;
}
- directory = NULL;
- mode = 0;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "mkdir_parents");
@@ -767,11 +719,6 @@ weechat_lua_api_list_add (lua_State *L)
LUA_RETURN_EMPTY;
}
- weelist = NULL;
- data = NULL;
- where = NULL;
- user_data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 4)
@@ -813,9 +760,6 @@ weechat_lua_api_list_search (lua_State *L)
LUA_RETURN_EMPTY;
}
- weelist = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -853,9 +797,6 @@ weechat_lua_api_list_casesearch (lua_State *L)
LUA_RETURN_EMPTY;
}
- weelist = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -893,9 +834,6 @@ weechat_lua_api_list_get (lua_State *L)
LUA_RETURN_EMPTY;
}
- weelist = NULL;
- position = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -932,9 +870,6 @@ weechat_lua_api_list_set (lua_State *L)
LUA_RETURN_ERROR;
}
- item = NULL;
- new_value = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -972,8 +907,6 @@ weechat_lua_api_list_next (lua_State *L)
LUA_RETURN_EMPTY;
}
- item = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -1009,8 +942,6 @@ weechat_lua_api_list_prev (lua_State *L)
LUA_RETURN_EMPTY;
}
- item = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -1045,8 +976,6 @@ weechat_lua_api_list_string (lua_State *L)
LUA_RETURN_EMPTY;
}
- item = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -1081,8 +1010,6 @@ weechat_lua_api_list_size (lua_State *L)
LUA_RETURN_INT(0);
}
- weelist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -1117,9 +1044,6 @@ weechat_lua_api_list_remove (lua_State *L)
LUA_RETURN_ERROR;
}
- weelist = NULL;
- item = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -1156,8 +1080,6 @@ weechat_lua_api_list_remove_all (lua_State *L)
LUA_RETURN_ERROR;
}
- weelist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -1192,8 +1114,6 @@ weechat_lua_api_list_free (lua_State *L)
LUA_RETURN_ERROR;
}
- weelist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -1271,10 +1191,6 @@ weechat_lua_api_config_new (lua_State *L)
LUA_RETURN_EMPTY;
}
- name = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -1554,21 +1470,6 @@ weechat_lua_api_config_new_section (lua_State *L)
LUA_RETURN_EMPTY;
}
- config_file = NULL;
- name = NULL;
- user_can_add_options = 0;
- user_can_delete_options = 0;
- function_read = NULL;
- data_read = NULL;
- function_write = NULL;
- data_write = NULL;
- function_write_default = NULL;
- data_write_default = NULL;
- function_create_option = NULL;
- data_create_option = NULL;
- function_delete_option = NULL;
- data_delete_option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 14)
@@ -1637,9 +1538,6 @@ weechat_lua_api_config_search_section (lua_State *L)
LUA_RETURN_EMPTY;
}
- config_file = NULL;
- section_name = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -1790,24 +1688,6 @@ weechat_lua_api_config_new_option (lua_State *L)
LUA_RETURN_EMPTY;
}
- config_file = NULL;
- section = NULL;
- name = NULL;
- type = NULL;
- description = NULL;
- string_values = NULL;
- min = 0;
- max = 0;
- default_value = NULL;
- value = NULL;
- null_value_allowed = 0;
- function_check_value = NULL;
- data_check_value = NULL;
- function_change = NULL;
- data_change = NULL;
- function_delete = NULL;
- data_delete = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 17)
@@ -1880,10 +1760,6 @@ weechat_lua_api_config_search_option (lua_State *L)
LUA_RETURN_EMPTY;
}
- config_file = NULL;
- section = NULL;
- option_name = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -1922,8 +1798,6 @@ weechat_lua_api_config_string_to_boolean (lua_State *L)
LUA_RETURN_INT(0);
}
- text = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -1958,9 +1832,6 @@ weechat_lua_api_config_option_reset (lua_State *L)
LUA_RETURN_INT(0);
}
- option = NULL;
- run_callback = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -1997,10 +1868,6 @@ weechat_lua_api_config_option_set (lua_State *L)
LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR);
}
- option = NULL;
- new_value = NULL;
- run_callback = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -2040,9 +1907,6 @@ weechat_lua_api_config_option_set_null (lua_State *L)
LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR);
}
- option = NULL;
- run_callback = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -2079,8 +1943,6 @@ weechat_lua_api_config_option_unset (lua_State *L)
LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2115,9 +1977,6 @@ weechat_lua_api_config_option_rename (lua_State *L)
LUA_RETURN_ERROR;
}
- option = NULL;
- new_name = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -2154,8 +2013,6 @@ weechat_lua_api_config_option_is_null (lua_State *L)
LUA_RETURN_INT(1);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2191,8 +2048,6 @@ weechat_lua_api_config_option_default_is_null (lua_State *L)
LUA_RETURN_INT(1);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2227,8 +2082,6 @@ weechat_lua_api_config_boolean (lua_State *L)
LUA_RETURN_INT(0);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2263,8 +2116,6 @@ weechat_lua_api_config_boolean_default (lua_State *L)
LUA_RETURN_INT(0);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2299,8 +2150,6 @@ weechat_lua_api_config_integer (lua_State *L)
LUA_RETURN_INT(0);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2335,8 +2184,6 @@ weechat_lua_api_config_integer_default (lua_State *L)
LUA_RETURN_INT(0);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2371,8 +2218,6 @@ weechat_lua_api_config_string (lua_State *L)
LUA_RETURN_EMPTY;
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2407,8 +2252,6 @@ weechat_lua_api_config_string_default (lua_State *L)
LUA_RETURN_EMPTY;
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2443,8 +2286,6 @@ weechat_lua_api_config_color (lua_State *L)
LUA_RETURN_INT(0);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2479,8 +2320,6 @@ weechat_lua_api_config_color_default (lua_State *L)
LUA_RETURN_INT(0);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2515,9 +2354,6 @@ weechat_lua_api_config_write_option (lua_State *L)
LUA_RETURN_ERROR;
}
- config_file = NULL;
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -2554,10 +2390,6 @@ weechat_lua_api_config_write_line (lua_State *L)
LUA_RETURN_ERROR;
}
- config_file = NULL;
- option_name = NULL;
- value = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -2597,8 +2429,6 @@ weechat_lua_api_config_write (lua_State *L)
LUA_RETURN_INT(-1);
}
- config_file = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2633,8 +2463,6 @@ weechat_lua_api_config_read (lua_State *L)
LUA_RETURN_INT(-1);
}
- config_file = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2669,8 +2497,6 @@ weechat_lua_api_config_reload (lua_State *L)
LUA_RETURN_INT(-1);
}
- config_file = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2705,8 +2531,6 @@ weechat_lua_api_config_option_free (lua_State *L)
LUA_RETURN_ERROR;
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2744,8 +2568,6 @@ weechat_lua_api_config_section_free_options (lua_State *L)
LUA_RETURN_ERROR;
}
- section = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2782,8 +2604,6 @@ weechat_lua_api_config_section_free (lua_State *L)
LUA_RETURN_ERROR;
}
- section = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2820,8 +2640,6 @@ weechat_lua_api_config_free (lua_State *L)
LUA_RETURN_ERROR;
}
- config_file = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2859,8 +2677,6 @@ weechat_lua_api_config_get (lua_State *L)
LUA_RETURN_EMPTY;
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2895,8 +2711,6 @@ weechat_lua_api_config_get_plugin (lua_State *L)
LUA_RETURN_EMPTY;
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2933,8 +2747,6 @@ weechat_lua_api_config_is_set_plugin (lua_State *L)
LUA_RETURN_INT(0);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -2971,9 +2783,6 @@ weechat_lua_api_config_set_plugin (lua_State *L)
LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR);
}
- option = NULL;
- value = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -3012,8 +2821,6 @@ weechat_lua_api_config_unset_plugin (lua_State *L)
LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR);
}
- option = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -3044,8 +2851,6 @@ weechat_lua_api_prefix (lua_State *L)
/* make C compiler happy */
(void) L;
- prefix = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -3074,10 +2879,8 @@ weechat_lua_api_color (lua_State *L)
/* make C compiler happy */
(void) L;
- color = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 1)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "color");
@@ -3104,11 +2907,8 @@ weechat_lua_api_print (lua_State *L)
/* make C compiler happy */
(void) L;
- buffer = NULL;
- message = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "print");
@@ -3146,11 +2946,6 @@ weechat_lua_api_print_date_tags (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- date = 0;
- tags = NULL;
- message = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 4)
@@ -3193,10 +2988,6 @@ weechat_lua_api_print_y (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- y = 0;
- message = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -3237,10 +3028,8 @@ weechat_lua_api_log_print (lua_State *L)
LUA_RETURN_ERROR;
}
- message = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 1)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "log_print");
@@ -3322,16 +3111,8 @@ weechat_lua_api_hook_command (lua_State *L)
LUA_RETURN_EMPTY;
}
- command = NULL;
- description = NULL;
- args = NULL;
- args_description = NULL;
- completion = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 7)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "hook_command");
@@ -3422,10 +3203,6 @@ weechat_lua_api_hook_command_run (lua_State *L)
LUA_RETURN_EMPTY;
}
- command = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -3509,14 +3286,8 @@ weechat_lua_api_hook_timer (lua_State *L)
LUA_RETURN_EMPTY;
}
- interval = 10;
- align_second = 0;
- max_calls = 0;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 5)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "hook_timer");
@@ -3601,15 +3372,8 @@ weechat_lua_api_hook_fd (lua_State *L)
LUA_RETURN_EMPTY;
}
- fd = 0;
- read = 0;
- write = 0;
- exception = 0;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 6)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "hook_fd");
@@ -3701,10 +3465,6 @@ weechat_lua_api_hook_process (lua_State *L)
LUA_RETURN_EMPTY;
}
- command = NULL;
- timeout = 0;
- function = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 4)
@@ -3795,15 +3555,6 @@ weechat_lua_api_hook_connect (lua_State *L)
LUA_RETURN_EMPTY;
}
- proxy = NULL;
- address = NULL;
- port = 0;
- sock = 0;
- ipv6 = 0;
- local_hostname = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 8)
@@ -3923,13 +3674,6 @@ weechat_lua_api_hook_print (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- tags = NULL;
- message = NULL;
- strip_colors = 0;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 6)
@@ -4038,10 +3782,6 @@ weechat_lua_api_hook_signal (lua_State *L)
LUA_RETURN_EMPTY;
}
- signal = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -4083,8 +3823,6 @@ weechat_lua_api_hook_signal_send (lua_State *L)
LUA_RETURN_ERROR;
}
- signal = NULL;
- type_data = NULL;
signal_data = NULL;
n = lua_gettop (lua_current_interpreter);
@@ -4181,10 +3919,6 @@ weechat_lua_api_hook_hsignal (lua_State *L)
LUA_RETURN_EMPTY;
}
- signal = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -4227,9 +3961,6 @@ weechat_lua_api_hook_hsignal_send (lua_State *L)
LUA_RETURN_ERROR;
}
- signal = NULL;
- hashtable = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -4297,7 +4028,7 @@ weechat_lua_api_hook_config_cb (void *data, const char *option,
static int
weechat_lua_api_hook_config (lua_State *L)
{
- const char *type, *option, *function, *data;
+ const char *option, *function, *data;
char *result;
int n;
@@ -4310,11 +4041,6 @@ weechat_lua_api_hook_config (lua_State *L)
LUA_RETURN_EMPTY;
}
- type = NULL;
- option = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -4403,11 +4129,6 @@ weechat_lua_api_hook_completion (lua_State *L)
LUA_RETURN_EMPTY;
}
- completion = NULL;
- description = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 4)
@@ -4451,11 +4172,6 @@ weechat_lua_api_hook_completion_list_add (lua_State *L)
LUA_RETURN_ERROR;
}
- completion = NULL;
- word = NULL;
- nick_completion = 0;
- where = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 4)
@@ -4528,10 +4244,6 @@ weechat_lua_api_hook_modifier (lua_State *L)
LUA_RETURN_EMPTY;
}
- modifier = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -4574,10 +4286,6 @@ weechat_lua_api_hook_modifier_exec (lua_State *L)
LUA_RETURN_EMPTY;
}
- modifier = NULL;
- modifier_data = NULL;
- string = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -4644,12 +4352,6 @@ weechat_lua_api_hook_info (lua_State *L)
LUA_RETURN_EMPTY;
}
- info_name = NULL;
- description = NULL;
- args_description = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 5)
@@ -4726,13 +4428,6 @@ weechat_lua_api_hook_info_hashtable (lua_State *L)
LUA_RETURN_EMPTY;
}
- info_name = NULL;
- description = NULL;
- args_description = NULL;
- output_description = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 6)
@@ -4818,13 +4513,6 @@ weechat_lua_api_hook_infolist (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist_name = NULL;
- description = NULL;
- pointer_description = NULL;
- args_description = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 6)
@@ -4872,8 +4560,6 @@ weechat_lua_api_unhook (lua_State *L)
LUA_RETURN_ERROR;
}
- hook = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -5015,12 +4701,6 @@ weechat_lua_api_buffer_new (lua_State *L)
LUA_RETURN_EMPTY;
}
- name = NULL;
- function_input = NULL;
- data_input = NULL;
- function_close = NULL;
- data_close = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 5)
@@ -5068,9 +4748,6 @@ weechat_lua_api_buffer_search (lua_State *L)
LUA_RETURN_EMPTY;
}
- plugin = NULL;
- name = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5152,8 +4829,6 @@ weechat_lua_api_buffer_clear (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -5188,8 +4863,6 @@ weechat_lua_api_buffer_close (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -5226,9 +4899,6 @@ weechat_lua_api_buffer_merge (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- target_buffer = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5266,9 +4936,6 @@ weechat_lua_api_buffer_unmerge (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- number = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5304,9 +4971,6 @@ weechat_lua_api_buffer_get_integer (lua_State *L)
LUA_RETURN_INT(-1);
}
- buffer = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5343,9 +5007,6 @@ weechat_lua_api_buffer_get_string (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5383,9 +5044,6 @@ weechat_lua_api_buffer_get_pointer (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5422,9 +5080,6 @@ weechat_lua_api_buffer_set (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -5463,9 +5118,6 @@ weechat_lua_api_buffer_string_replace_local_var (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- string = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5524,9 +5176,6 @@ weechat_lua_api_window_get_integer (lua_State *L)
LUA_RETURN_INT(-1);
}
- window = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5563,9 +5212,6 @@ weechat_lua_api_window_get_string (lua_State *L)
LUA_RETURN_EMPTY;
}
- window = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5603,9 +5249,6 @@ weechat_lua_api_window_get_pointer (lua_State *L)
LUA_RETURN_EMPTY;
}
- window = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5642,8 +5285,6 @@ weechat_lua_api_window_set_title (lua_State *L)
LUA_RETURN_ERROR;
}
- title = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -5679,12 +5320,6 @@ weechat_lua_api_nicklist_add_group (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- parent_group = NULL;
- name = NULL;
- color = NULL;
- visible = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 5)
@@ -5728,10 +5363,6 @@ weechat_lua_api_nicklist_search_group (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- from_group = NULL;
- name = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -5771,14 +5402,6 @@ weechat_lua_api_nicklist_add_nick (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- group = NULL;
- name = NULL;
- color = NULL;
- prefix = NULL;
- prefix_color = NULL;
- visible = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 7)
@@ -5826,10 +5449,6 @@ weechat_lua_api_nicklist_search_nick (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- from_group = NULL;
- name = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -5868,9 +5487,6 @@ weechat_lua_api_nicklist_remove_group (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- group = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5907,9 +5523,6 @@ weechat_lua_api_nicklist_remove_nick (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- nick = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -5946,8 +5559,6 @@ weechat_lua_api_nicklist_remove_all (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -5982,10 +5593,6 @@ weechat_lua_api_nicklist_group_get_integer (lua_State *L)
LUA_RETURN_INT(-1);
}
- buffer = NULL;
- group = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6024,10 +5631,6 @@ weechat_lua_api_nicklist_group_get_string (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- group = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6067,10 +5670,6 @@ weechat_lua_api_nicklist_group_get_pointer (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- group = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6109,11 +5708,6 @@ weechat_lua_api_nicklist_group_set (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- group = NULL;
- property = NULL;
- value = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 4)
@@ -6154,10 +5748,6 @@ weechat_lua_api_nicklist_nick_get_integer (lua_State *L)
LUA_RETURN_INT(-1);
}
- buffer = NULL;
- nick = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6196,10 +5786,6 @@ weechat_lua_api_nicklist_nick_get_string (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- nick = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6239,10 +5825,6 @@ weechat_lua_api_nicklist_nick_get_pointer (lua_State *L)
LUA_RETURN_EMPTY;
}
- buffer = NULL;
- nick = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6281,11 +5863,6 @@ weechat_lua_api_nicklist_nick_set (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- nick = NULL;
- property = NULL;
- value = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 4)
@@ -6327,8 +5904,6 @@ weechat_lua_api_bar_item_search (lua_State *L)
LUA_RETURN_EMPTY;
}
- name = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -6400,10 +5975,6 @@ weechat_lua_api_bar_item_new (lua_State *L)
LUA_RETURN_EMPTY;
}
- name = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6445,10 +6016,8 @@ weechat_lua_api_bar_item_update (lua_State *L)
LUA_RETURN_ERROR;
}
- name = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 1)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "bar_item_update");
@@ -6481,10 +6050,8 @@ weechat_lua_api_bar_item_remove (lua_State *L)
LUA_RETURN_ERROR;
}
- item = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 1)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "bar_item_remove");
@@ -6520,8 +6087,6 @@ weechat_lua_api_bar_search (lua_State *L)
LUA_RETURN_EMPTY;
}
- name = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -6559,22 +6124,6 @@ weechat_lua_api_bar_new (lua_State *L)
LUA_RETURN_EMPTY;
}
- name = NULL;
- hidden = NULL;
- priority = NULL;
- type = NULL;
- conditions = NULL;
- position = NULL;
- filling_top_bottom = NULL;
- filling_left_right = NULL;
- size = NULL;
- size_max = NULL;
- color_fg = NULL;
- color_delim = NULL;
- color_bg = NULL;
- separator = NULL;
- items = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 15)
@@ -6637,9 +6186,6 @@ weechat_lua_api_bar_set (lua_State *L)
LUA_RETURN_ERROR;
}
- bar = NULL;
- property = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6678,10 +6224,8 @@ weechat_lua_api_bar_update (lua_State *L)
LUA_RETURN_ERROR;
}
- name = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 1)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "bar_update");
@@ -6714,8 +6258,6 @@ weechat_lua_api_bar_remove (lua_State *L)
LUA_RETURN_ERROR;
}
- bar = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -6750,11 +6292,8 @@ weechat_lua_api_command (lua_State *L)
LUA_RETURN_ERROR;
}
- buffer = NULL;
- command = NULL;
-
n = lua_gettop (lua_current_interpreter);
-
+
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "command");
@@ -6791,9 +6330,6 @@ weechat_lua_api_info_get (lua_State *L)
LUA_RETURN_EMPTY;
}
- info_name = NULL;
- arguments = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -6830,9 +6366,6 @@ weechat_lua_api_info_get_hashtable (lua_State *L)
LUA_RETURN_EMPTY;
}
- info_name = NULL;
- table = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -6900,8 +6433,6 @@ weechat_lua_api_infolist_new_item (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -6938,10 +6469,6 @@ weechat_lua_api_infolist_new_var_integer (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
- name = NULL;
- value = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -6982,10 +6509,6 @@ weechat_lua_api_infolist_new_var_string (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
- name = NULL;
- value = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -7026,10 +6549,6 @@ weechat_lua_api_infolist_new_var_pointer (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
- name = NULL;
- value = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -7069,10 +6588,6 @@ weechat_lua_api_infolist_new_var_time (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
- name = NULL;
- value = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -7112,10 +6627,6 @@ weechat_lua_api_infolist_get (lua_State *L)
LUA_RETURN_EMPTY;
}
- name = NULL;
- pointer = NULL;
- arguments = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -7154,8 +6665,6 @@ weechat_lua_api_infolist_next (lua_State *L)
LUA_RETURN_INT(0);
}
- infolist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -7190,8 +6699,6 @@ weechat_lua_api_infolist_prev (lua_State *L)
LUA_RETURN_INT(0);
}
- infolist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -7227,8 +6734,6 @@ weechat_lua_api_infolist_reset_item_cursor (lua_State *L)
LUA_RETURN_ERROR;
}
- infolist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -7263,8 +6768,6 @@ weechat_lua_api_infolist_fields (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -7299,9 +6802,6 @@ weechat_lua_api_infolist_integer (lua_State *L)
LUA_RETURN_INT(0);
}
- infolist = NULL;
- variable = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -7338,9 +6838,6 @@ weechat_lua_api_infolist_string (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
- variable = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -7378,9 +6875,6 @@ weechat_lua_api_infolist_pointer (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
- variable = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -7419,9 +6913,6 @@ weechat_lua_api_infolist_time (lua_State *L)
LUA_RETURN_EMPTY;
}
- infolist = NULL;
- variable = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -7460,8 +6951,6 @@ weechat_lua_api_infolist_free (lua_State *L)
LUA_RETURN_ERROR;
}
- infolist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
@@ -7497,9 +6986,6 @@ weechat_lua_api_upgrade_new (lua_State *L)
LUA_RETURN_EMPTY;
}
- filename = NULL;
- write = 0;
-
n = lua_gettop (lua_current_interpreter);
if (n < 2)
@@ -7535,10 +7021,6 @@ weechat_lua_api_upgrade_write_object (lua_State *L)
LUA_RETURN_INT(0);
}
- upgrade_file = NULL;
- object_id = 0;
- infolist = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -7626,10 +7108,6 @@ weechat_lua_api_upgrade_read (lua_State *L)
LUA_RETURN_EMPTY;
}
- upgrade_file = NULL;
- function = NULL;
- data = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 3)
@@ -7671,8 +7149,6 @@ weechat_lua_api_upgrade_close (lua_State *L)
LUA_RETURN_ERROR;
}
- upgrade_file = NULL;
-
n = lua_gettop (lua_current_interpreter);
if (n < 1)
diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c
index 8437d6732..78fdad487 100644
--- a/src/plugins/scripts/ruby/weechat-ruby-api.c
+++ b/src/plugins/scripts/ruby/weechat-ruby-api.c
@@ -70,14 +70,6 @@ weechat_ruby_api_register (VALUE class, VALUE name, VALUE author,
ruby_current_script = NULL;
ruby_registered_script = NULL;
- c_name = NULL;
- c_author = NULL;
- c_version = NULL;
- c_license = NULL;
- c_description = NULL;
- c_shutdown_func = NULL;
- c_charset = NULL;
-
if (NIL_P (name) || NIL_P (author) || NIL_P (version)
|| NIL_P (license) || NIL_P (description) || NIL_P (shutdown_func)
|| NIL_P (charset))
@@ -161,8 +153,6 @@ weechat_ruby_api_plugin_get_name (VALUE class, VALUE plugin)
RUBY_RETURN_EMPTY;
}
- c_plugin = NULL;
-
if (NIL_P (plugin))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "plugin_get_name");
@@ -196,8 +186,6 @@ weechat_ruby_api_charset_set (VALUE class, VALUE charset)
RUBY_RETURN_ERROR;
}
- c_charset = NULL;
-
if (NIL_P (charset))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "charset_set");
@@ -232,9 +220,6 @@ weechat_ruby_api_iconv_to_internal (VALUE class, VALUE charset, VALUE string)
RUBY_RETURN_EMPTY;
}
- c_charset = NULL;
- c_string = NULL;
-
if (NIL_P (charset) || NIL_P (string))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "iconv_to_internal");
@@ -272,9 +257,6 @@ weechat_ruby_api_iconv_from_internal (VALUE class, VALUE charset, VALUE string)
RUBY_RETURN_EMPTY;
}
- c_charset = NULL;
- c_string = NULL;
-
if (NIL_P (charset) || NIL_P (string))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "iconv_from_internal");
@@ -311,8 +293,6 @@ weechat_ruby_api_gettext (VALUE class, VALUE string)
RUBY_RETURN_EMPTY;
}
- c_string = NULL;
-
if (NIL_P (string))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "gettext");
@@ -349,10 +329,6 @@ weechat_ruby_api_ngettext (VALUE class, VALUE single, VALUE plural,
RUBY_RETURN_EMPTY;
}
- c_single = NULL;
- c_plural = NULL;
- c_count = 0;
-
if (NIL_P (single) || NIL_P (plural) || NIL_P (count))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "ngettext");
@@ -394,10 +370,6 @@ weechat_ruby_api_string_match (VALUE class, VALUE string, VALUE mask,
RUBY_RETURN_INT(0);
}
- c_string = NULL;
- c_mask = NULL;
- c_case_sensitive = 0;
-
if (NIL_P (string) || NIL_P (mask) || NIL_P (case_sensitive))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "string_match");
@@ -441,9 +413,6 @@ weechat_ruby_api_string_has_highlight (VALUE class, VALUE string,
RUBY_RETURN_INT(0);
}
- c_string = NULL;
- c_highlight_words = NULL;
-
if (NIL_P (string) || NIL_P (highlight_words))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "string_has_highlight");
@@ -483,8 +452,6 @@ weechat_ruby_api_string_mask_to_regex (VALUE class, VALUE mask)
RUBY_RETURN_EMPTY;
}
- c_mask = NULL;
-
if (NIL_P (mask))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "string_mask_to_regex");
@@ -520,9 +487,6 @@ weechat_ruby_api_string_remove_color (VALUE class, VALUE string,
RUBY_RETURN_EMPTY;
}
- c_string = NULL;
- c_replacement = NULL;
-
if (NIL_P (string) || NIL_P (replacement))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "string_remove_color");
@@ -560,8 +524,6 @@ weechat_ruby_api_string_is_command_char (VALUE class, VALUE string)
RUBY_RETURN_INT(0);
}
- c_string = NULL;
-
if (NIL_P (string))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "string_is_command_char");
@@ -598,8 +560,6 @@ weechat_ruby_api_string_input_for_buffer (VALUE class, VALUE string)
RUBY_RETURN_EMPTY;
}
- c_string = NULL;
-
if (NIL_P (string))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "string_input_for_buffer");
@@ -634,9 +594,6 @@ weechat_ruby_api_mkdir_home (VALUE class, VALUE directory, VALUE mode)
RUBY_RETURN_ERROR;
}
- c_directory = NULL;
- c_mode = 0;
-
if (NIL_P (directory) || NIL_P (mode))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "mkdir_home");
@@ -674,9 +631,6 @@ weechat_ruby_api_mkdir (VALUE class, VALUE directory, VALUE mode)
RUBY_RETURN_ERROR;
}
- c_directory = NULL;
- c_mode = 0;
-
if (NIL_P (directory) || NIL_P (mode))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "mkdir");
@@ -715,9 +669,6 @@ weechat_ruby_api_mkdir_parents (VALUE class, VALUE directory, VALUE mode)
RUBY_RETURN_ERROR;
}
- c_directory = NULL;
- c_mode = 0;
-
if (NIL_P (directory) || NIL_P (mode))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "mkdir_parents");
@@ -778,11 +729,6 @@ weechat_ruby_api_list_add (VALUE class, VALUE weelist, VALUE data, VALUE where,
RUBY_RETURN_EMPTY;
}
- c_weelist = NULL;
- c_data = NULL;
- c_where = NULL;
- c_user_data = NULL;
-
if (NIL_P (weelist) || NIL_P (data) || NIL_P (where) || NIL_P (user_data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_add");
@@ -825,9 +771,6 @@ weechat_ruby_api_list_search (VALUE class, VALUE weelist, VALUE data)
RUBY_RETURN_EMPTY;
}
- c_weelist = NULL;
- c_data = NULL;
-
if (NIL_P (weelist) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_search");
@@ -864,9 +807,6 @@ weechat_ruby_api_list_casesearch (VALUE class, VALUE weelist, VALUE data)
RUBY_RETURN_EMPTY;
}
- c_weelist = NULL;
- c_data = NULL;
-
if (NIL_P (weelist) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_casesearch");
@@ -904,9 +844,6 @@ weechat_ruby_api_list_get (VALUE class, VALUE weelist, VALUE position)
RUBY_RETURN_EMPTY;
}
- c_weelist = NULL;
- c_position = 0;
-
if (NIL_P (weelist) || NIL_P (position))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_get");
@@ -943,9 +880,6 @@ weechat_ruby_api_list_set (VALUE class, VALUE item, VALUE new_value)
RUBY_RETURN_ERROR;
}
- c_item = NULL;
- c_new_value = NULL;
-
if (NIL_P (item) || NIL_P (new_value))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_set");
@@ -982,8 +916,6 @@ weechat_ruby_api_list_next (VALUE class, VALUE item)
RUBY_RETURN_EMPTY;
}
- c_item = NULL;
-
if (NIL_P (item))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_next");
@@ -1017,8 +949,6 @@ weechat_ruby_api_list_prev (VALUE class, VALUE item)
RUBY_RETURN_EMPTY;
}
- c_item = NULL;
-
if (NIL_P (item))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_prev");
@@ -1053,8 +983,6 @@ weechat_ruby_api_list_string (VALUE class, VALUE item)
RUBY_RETURN_EMPTY;
}
- c_item = NULL;
-
if (NIL_P (item))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_string");
@@ -1089,8 +1017,6 @@ weechat_ruby_api_list_size (VALUE class, VALUE weelist)
RUBY_RETURN_INT(0);
}
- c_weelist = NULL;
-
if (NIL_P (weelist))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_size");
@@ -1124,9 +1050,6 @@ weechat_ruby_api_list_remove (VALUE class, VALUE weelist, VALUE item)
RUBY_RETURN_ERROR;
}
- c_weelist = NULL;
- c_item = NULL;
-
if (NIL_P (weelist) || NIL_P (item))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_remove");
@@ -1163,8 +1086,6 @@ weechat_ruby_api_list_remove_all (VALUE class, VALUE weelist)
RUBY_RETURN_ERROR;
}
- c_weelist = NULL;
-
if (NIL_P (weelist))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_remove_all");
@@ -1198,8 +1119,6 @@ weechat_ruby_api_list_free (VALUE class, VALUE weelist)
RUBY_RETURN_ERROR;
}
- c_weelist = NULL;
-
if (NIL_P (weelist))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "list_free");
@@ -1276,10 +1195,6 @@ weechat_ruby_api_config_new (VALUE class, VALUE name, VALUE function,
RUBY_RETURN_EMPTY;
}
- c_name = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (name) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_new");
@@ -1573,21 +1488,6 @@ weechat_ruby_api_config_new_section (VALUE class, VALUE config_file,
RUBY_RETURN_EMPTY;
}
- c_config_file = NULL;
- c_name = NULL;
- c_user_can_add_options = 0;
- c_user_can_delete_options = 0;
- c_function_read = NULL;
- c_data_read = NULL;
- c_function_write = NULL;
- c_data_write = NULL;
- c_function_write_default = NULL;
- c_data_write_default = NULL;
- c_function_create_option = NULL;
- c_data_create_option = NULL;
- c_function_delete_option = NULL;
- c_data_delete_option = NULL;
-
if (NIL_P (config_file) || NIL_P (name) || NIL_P (user_can_add_options)
|| NIL_P (user_can_delete_options) || NIL_P (function_read)
|| NIL_P (data_read) || NIL_P (function_write) || NIL_P (data_write)
@@ -1674,9 +1574,6 @@ weechat_ruby_api_config_search_section (VALUE class, VALUE config_file,
RUBY_RETURN_EMPTY;
}
- c_config_file = NULL;
- c_section_name = NULL;
-
if (NIL_P (config_file) || NIL_P (section_name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_search_section");
@@ -1838,24 +1735,6 @@ weechat_ruby_api_config_new_option (VALUE class, VALUE config_file,
RUBY_RETURN_EMPTY;
}
- c_config_file = NULL;
- c_section = NULL;
- c_name = NULL;
- c_type = NULL;
- c_description = NULL;
- c_string_values = NULL;
- c_min = 0;
- c_max = 0;
- c_default_value = NULL;
- c_value = NULL;
- c_null_value_allowed = 0;
- c_function_check_value = NULL;
- c_data_check_value = NULL;
- c_function_change = NULL;
- c_data_change = NULL;
- c_function_delete = NULL;
- c_data_delete = NULL;
-
if (NIL_P (config_file) || NIL_P (section) || NIL_P (name) || NIL_P (type)
|| NIL_P (description) || NIL_P (string_values)
|| NIL_P (default_value) || NIL_P (value) || NIL_P (null_value_allowed)
@@ -1949,10 +1828,6 @@ weechat_ruby_api_config_search_option (VALUE class, VALUE config_file,
RUBY_RETURN_EMPTY;
}
- c_config_file = NULL;
- c_section = NULL;
- c_option_name = NULL;
-
if (NIL_P (config_file) || NIL_P (section) || NIL_P (option_name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_search_option");
@@ -1993,8 +1868,6 @@ weechat_ruby_api_config_string_to_boolean (VALUE class, VALUE text)
RUBY_RETURN_INT(0);
}
- c_text = NULL;
-
if (NIL_P (text))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_string_to_boolean");
@@ -2030,9 +1903,6 @@ weechat_ruby_api_config_option_reset (VALUE class, VALUE option,
RUBY_RETURN_INT(0);
}
- c_option = NULL;
- c_run_callback = 0;
-
if (NIL_P (option) || NIL_P (run_callback))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_option_reset");
@@ -2071,10 +1941,6 @@ weechat_ruby_api_config_option_set (VALUE class, VALUE option, VALUE new_value,
RUBY_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR);
}
- c_option = NULL;
- c_new_value = NULL;
- c_run_callback = 0;
-
if (NIL_P (option) || NIL_P (new_value) || NIL_P (run_callback))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_option_set");
@@ -2117,9 +1983,6 @@ weechat_ruby_api_config_option_set_null (VALUE class, VALUE option,
RUBY_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR);
}
- c_option = NULL;
- c_run_callback = 0;
-
if (NIL_P (option) || NIL_P (run_callback))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_option_set_null");
@@ -2157,8 +2020,6 @@ weechat_ruby_api_config_option_unset (VALUE class, VALUE option)
RUBY_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_option_unset");
@@ -2193,9 +2054,6 @@ weechat_ruby_api_config_option_rename (VALUE class, VALUE option,
RUBY_RETURN_ERROR;
}
- c_option = NULL;
- c_new_name = NULL;
-
if (NIL_P (option) || NIL_P (new_name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_option_rename");
@@ -2233,8 +2091,6 @@ weechat_ruby_api_config_option_is_null (VALUE class, VALUE option)
RUBY_RETURN_INT(1);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_option_is_null");
@@ -2269,8 +2125,6 @@ weechat_ruby_api_config_option_default_is_null (VALUE class, VALUE option)
RUBY_RETURN_INT(1);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_option_default_is_null");
@@ -2305,8 +2159,6 @@ weechat_ruby_api_config_boolean (VALUE class, VALUE option)
RUBY_RETURN_INT(0);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_boolean");
@@ -2341,8 +2193,6 @@ weechat_ruby_api_config_boolean_default (VALUE class, VALUE option)
RUBY_RETURN_INT(0);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_boolean_default");
@@ -2377,8 +2227,6 @@ weechat_ruby_api_config_integer (VALUE class, VALUE option)
RUBY_RETURN_INT(0);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_integer");
@@ -2413,8 +2261,6 @@ weechat_ruby_api_config_integer_default (VALUE class, VALUE option)
RUBY_RETURN_INT(0);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_integer_default");
@@ -2449,8 +2295,6 @@ weechat_ruby_api_config_string (VALUE class, VALUE option)
RUBY_RETURN_EMPTY;
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_string");
@@ -2485,8 +2329,6 @@ weechat_ruby_api_config_string_default (VALUE class, VALUE option)
RUBY_RETURN_EMPTY;
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_string_default");
@@ -2521,8 +2363,6 @@ weechat_ruby_api_config_color (VALUE class, VALUE option)
RUBY_RETURN_INT(0);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_color");
@@ -2557,8 +2397,6 @@ weechat_ruby_api_config_color_default (VALUE class, VALUE option)
RUBY_RETURN_INT(0);
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_color_default");
@@ -2593,9 +2431,6 @@ weechat_ruby_api_config_write_option (VALUE class, VALUE config_file,
RUBY_RETURN_ERROR;
}
- c_config_file = NULL;
- c_option = NULL;
-
if (NIL_P (config_file) || NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_write_option");
@@ -2633,10 +2468,6 @@ weechat_ruby_api_config_write_line (VALUE class, VALUE config_file,
RUBY_RETURN_ERROR;
}
- c_config_file = NULL;
- c_option_name = NULL;
- c_value = NULL;
-
if (NIL_P (config_file) || NIL_P (option_name) || NIL_P (value))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_write_line");
@@ -2678,8 +2509,6 @@ weechat_ruby_api_config_write (VALUE class, VALUE config_file)
RUBY_RETURN_INT(-1);
}
- c_config_file = NULL;
-
if (NIL_P (config_file))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_write");
@@ -2714,8 +2543,6 @@ weechat_ruby_api_config_read (VALUE class, VALUE config_file)
RUBY_RETURN_INT(-1);
}
- c_config_file = NULL;
-
if (NIL_P (config_file))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_read");
@@ -2750,8 +2577,6 @@ weechat_ruby_api_config_reload (VALUE class, VALUE config_file)
RUBY_RETURN_INT(-1);
}
- c_config_file = NULL;
-
if (NIL_P (config_file))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_reload");
@@ -2785,8 +2610,6 @@ weechat_ruby_api_config_option_free (VALUE class, VALUE option)
RUBY_RETURN_ERROR;
}
- c_option = NULL;
-
if (NIL_P (option))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_option_free");
@@ -2823,8 +2646,6 @@ weechat_ruby_api_config_section_free_options (VALUE class, VALUE section)
RUBY_RETURN_ERROR;
}
- c_section = NULL;
-
if (NIL_P (section))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_section_free_options");
@@ -2860,8 +2681,6 @@ weechat_ruby_api_config_section_free (VALUE class, VALUE section)
RUBY_RETURN_ERROR;
}
- c_section = NULL;
-
if (NIL_P (section))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_section_free");
@@ -2897,8 +2716,6 @@ weechat_ruby_api_config_free (VALUE class, VALUE config_file)
RUBY_RETURN_ERROR;
}
- c_config_file = NULL;
-
if (NIL_P (config_file))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "config_free");
@@ -3110,8 +2927,6 @@ weechat_ruby_api_prefix (VALUE class, VALUE prefix)
/* make C compiler happy */
(void) class;
- c_prefix = NULL;
-
if (NIL_P (prefix))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "prefix");
@@ -3140,8 +2955,6 @@ weechat_ruby_api_color (VALUE class, VALUE color)
/* make C compiler happy */
(void) class;
- c_color = NULL;
-
if (NIL_P (color))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "color");
@@ -3169,9 +2982,6 @@ weechat_ruby_api_print (VALUE class, VALUE buffer, VALUE message)
/* make C compiler happy */
(void) class;
- c_buffer = NULL;
- c_message = NULL;
-
if (NIL_P (buffer) || NIL_P (message))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "print");
@@ -3213,11 +3023,6 @@ weechat_ruby_api_print_date_tags (VALUE class, VALUE buffer, VALUE date,
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
- c_date = 0;
- c_tags = NULL;
- c_message = NULL;
-
if (NIL_P (buffer) || NIL_P (date) || NIL_P (tags) || NIL_P (message))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "print_date_tags");
@@ -3263,10 +3068,6 @@ weechat_ruby_api_print_y (VALUE class, VALUE buffer, VALUE y, VALUE message)
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
- c_y = 0;
- c_message = NULL;
-
if (NIL_P (buffer) || NIL_P (message))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "print_y");
@@ -3308,8 +3109,6 @@ weechat_ruby_api_log_print (VALUE class, VALUE message)
RUBY_RETURN_ERROR;
}
- c_message = NULL;
-
if (NIL_P (message))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "log_print");
@@ -3394,14 +3193,6 @@ weechat_ruby_api_hook_command (VALUE class, VALUE command, VALUE description,
RUBY_RETURN_EMPTY;
}
- c_command = NULL;
- c_description = NULL;
- c_args = NULL;
- c_args_description = NULL;
- c_completion = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (command) || NIL_P (description) || NIL_P (args)
|| NIL_P (args_description) || NIL_P (completion) || NIL_P (function)
|| NIL_P (data))
@@ -3502,10 +3293,6 @@ weechat_ruby_api_hook_command_run (VALUE class, VALUE command, VALUE function,
RUBY_RETURN_EMPTY;
}
- c_command = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (command) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_command_run");
@@ -3592,12 +3379,6 @@ weechat_ruby_api_hook_timer (VALUE class, VALUE interval, VALUE align_second,
RUBY_RETURN_EMPTY;
}
- c_interval = 0;
- c_align_second = 0;
- c_max_calls = 0;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (interval) || NIL_P (align_second) || NIL_P (max_calls)
|| NIL_P (function) || NIL_P (data))
{
@@ -3690,13 +3471,6 @@ weechat_ruby_api_hook_fd (VALUE class, VALUE fd, VALUE read, VALUE write,
RUBY_RETURN_EMPTY;
}
- c_fd = 0;
- c_read = 0;
- c_write = 0;
- c_exception = 0;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (fd) || NIL_P (read) || NIL_P (write) || NIL_P (exception)
|| NIL_P (function) || NIL_P (data))
{
@@ -3797,11 +3571,6 @@ weechat_ruby_api_hook_process (VALUE class, VALUE command, VALUE timeout,
RUBY_RETURN_EMPTY;
}
- c_command = NULL;
- c_timeout = 0;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (command) || NIL_P (timeout) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_process");
@@ -3898,15 +3667,6 @@ weechat_ruby_api_hook_connect (VALUE class, VALUE proxy, VALUE address,
RUBY_RETURN_EMPTY;
}
- c_proxy = NULL;
- c_address = NULL;
- c_port = 0;
- c_sock = 0;
- c_ipv6 = 0;
- c_local_hostname = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (proxy) || NIL_P (address) || NIL_P (port) || NIL_P (sock)
|| NIL_P (ipv6) || NIL_P (local_hostname) || NIL_P (function)
|| NIL_P (data))
@@ -4037,13 +3797,6 @@ weechat_ruby_api_hook_print (VALUE class, VALUE buffer, VALUE tags,
RUBY_RETURN_EMPTY;
}
- c_buffer = NULL;
- c_tags = NULL;
- c_message = NULL;
- c_strip_colors = 0;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (buffer) || NIL_P (tags) || NIL_P (message)
|| NIL_P (strip_colors) || NIL_P (function) || NIL_P (data))
{
@@ -4158,10 +3911,6 @@ weechat_ruby_api_hook_signal (VALUE class, VALUE signal, VALUE function,
RUBY_RETURN_EMPTY;
}
- c_signal = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (signal) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_signal");
@@ -4206,10 +3955,6 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data,
RUBY_RETURN_ERROR;
}
- c_signal = NULL;
- c_type_data = NULL;
- c_signal_data = NULL;
-
if (NIL_P (signal) || NIL_P (type_data) || NIL_P (signal_data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_signal_send");
@@ -4308,10 +4053,6 @@ weechat_ruby_api_hook_hsignal (VALUE class, VALUE signal, VALUE function,
RUBY_RETURN_EMPTY;
}
- c_signal = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (signal) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_hsignal");
@@ -4355,8 +4096,6 @@ weechat_ruby_api_hook_hsignal_send (VALUE class, VALUE signal, VALUE hashtable)
RUBY_RETURN_ERROR;
}
- c_signal = NULL;
-
if (NIL_P (signal) || NIL_P (hashtable))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_hsignal_send");
@@ -4437,10 +4176,6 @@ weechat_ruby_api_hook_config (VALUE class, VALUE option, VALUE function,
RUBY_RETURN_EMPTY;
}
- c_option = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (option) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_config");
@@ -4532,11 +4267,6 @@ weechat_ruby_api_hook_completion (VALUE class, VALUE completion,
RUBY_RETURN_EMPTY;
}
- c_completion = NULL;
- c_description = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (completion) || NIL_P (description) || NIL_P (function)
|| NIL_P (data))
{
@@ -4586,11 +4316,6 @@ weechat_ruby_api_hook_completion_list_add (VALUE class, VALUE completion,
RUBY_RETURN_ERROR;
}
- c_completion = NULL;
- c_word = NULL;
- c_nick_completion = 0;
- c_where = NULL;
-
if (NIL_P (completion) || NIL_P (word) || NIL_P (nick_completion)
|| NIL_P (where))
{
@@ -4666,10 +4391,6 @@ weechat_ruby_api_hook_modifier (VALUE class, VALUE modifier, VALUE function,
RUBY_RETURN_EMPTY;
}
- c_modifier = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (modifier) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_modifier");
@@ -4714,10 +4435,6 @@ weechat_ruby_api_hook_modifier_exec (VALUE class, VALUE modifier,
RUBY_RETURN_EMPTY;
}
- c_modifier = NULL;
- c_modifier_data = NULL;
- c_string = NULL;
-
if (NIL_P (modifier) || NIL_P (modifier_data) || NIL_P (string))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_modifier_exec");
@@ -4787,12 +4504,6 @@ weechat_ruby_api_hook_info (VALUE class, VALUE info_name, VALUE description,
RUBY_RETURN_EMPTY;
}
- c_info_name = NULL;
- c_description = NULL;
- c_args_description = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (info_name) || NIL_P (description) || NIL_P (args_description)
|| NIL_P (function) || NIL_P (data))
{
@@ -4878,13 +4589,6 @@ weechat_ruby_api_hook_info_hashtable (VALUE class, VALUE info_name,
RUBY_RETURN_EMPTY;
}
- c_info_name = NULL;
- c_description = NULL;
- c_args_description = NULL;
- c_output_description = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (info_name) || NIL_P (description) || NIL_P (args_description)
|| NIL_P (output_description) || NIL_P (function) || NIL_P (data))
{
@@ -4978,13 +4682,6 @@ weechat_ruby_api_hook_infolist (VALUE class, VALUE infolist_name,
RUBY_RETURN_EMPTY;
}
- c_infolist_name = NULL;
- c_description = NULL;
- c_pointer_description = NULL;
- c_args_description = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (infolist_name) || NIL_P (description)
|| NIL_P (pointer_description) || NIL_P (args_description)
|| NIL_P (function) || NIL_P (data))
@@ -5038,8 +4735,6 @@ weechat_ruby_api_unhook (VALUE class, VALUE hook)
RUBY_RETURN_ERROR;
}
- c_hook = NULL;
-
if (NIL_P (hook))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "unhook");
@@ -5182,12 +4877,6 @@ weechat_ruby_api_buffer_new (VALUE class, VALUE name, VALUE function_input,
RUBY_RETURN_EMPTY;
}
- c_name = NULL;
- c_function_input = NULL;
- c_data_input = NULL;
- c_function_close = NULL;
- c_data_close = NULL;
-
if (NIL_P (name) || NIL_P (function_input) || NIL_P (data_input)
|| NIL_P (function_close) || NIL_P (data_close))
{
@@ -5239,9 +4928,6 @@ weechat_ruby_api_buffer_search (VALUE class, VALUE plugin, VALUE name)
RUBY_RETURN_EMPTY;
}
- c_plugin = NULL;
- c_name = NULL;
-
if (NIL_P (plugin) || NIL_P (name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "buffer_search");
@@ -5325,8 +5011,6 @@ weechat_ruby_api_buffer_clear (VALUE class, VALUE buffer)
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
-
if (NIL_P (buffer))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "buffer_clear");
@@ -5360,8 +5044,6 @@ weechat_ruby_api_buffer_close (VALUE class, VALUE buffer)
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
-
if (NIL_P (buffer))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "buffer_close");
@@ -5397,9 +5079,6 @@ weechat_ruby_api_buffer_merge (VALUE class, VALUE buffer, VALUE target_buffer)
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
- c_target_buffer = NULL;
-
if (NIL_P (buffer) || NIL_P (target_buffer))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "buffer_merge");
@@ -5438,9 +5117,6 @@ weechat_ruby_api_buffer_unmerge (VALUE class, VALUE buffer, VALUE number)
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
- c_number = 0;
-
if (NIL_P (buffer) || NIL_P (number))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "buffer_unmerge");
@@ -5453,7 +5129,7 @@ weechat_ruby_api_buffer_unmerge (VALUE class, VALUE buffer, VALUE number)
c_buffer = StringValuePtr (buffer);
c_number = FIX2INT (number);
- weechat_buffer_unmerge (script_str2ptr (c_buffer), number);
+ weechat_buffer_unmerge (script_str2ptr (c_buffer), c_number);
RUBY_RETURN_OK;
}
@@ -5629,9 +5305,6 @@ weechat_ruby_api_buffer_string_replace_local_var (VALUE class, VALUE buffer, VAL
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
- c_string = NULL;
-
if (NIL_P (buffer) || NIL_P (string))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "buffer_string_replace_local_var");
@@ -5839,12 +5512,6 @@ weechat_ruby_api_nicklist_add_group (VALUE class, VALUE buffer,
RUBY_RETURN_EMPTY;
}
- c_buffer = NULL;
- c_parent_group = NULL;
- c_name = NULL;
- c_color = NULL;
- c_visible = 0;
-
if (NIL_P (buffer) || NIL_P (parent_group) || NIL_P (name) || NIL_P (color)
|| NIL_P (visible))
{
@@ -5893,10 +5560,6 @@ weechat_ruby_api_nicklist_search_group (VALUE class, VALUE buffer,
RUBY_RETURN_EMPTY;
}
- c_buffer = NULL;
- c_from_group = NULL;
- c_name = NULL;
-
if (NIL_P (buffer) || NIL_P (from_group) || NIL_P (name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_search_group");
@@ -5941,14 +5604,6 @@ weechat_ruby_api_nicklist_add_nick (VALUE class, VALUE buffer, VALUE group,
RUBY_RETURN_EMPTY;
}
- c_buffer = NULL;
- c_group = NULL;
- c_name = NULL;
- c_color = NULL;
- c_prefix = NULL;
- c_prefix_color = NULL;
- c_visible = 0;
-
if (NIL_P (buffer) || NIL_P (group) || NIL_P (name) || NIL_P (color)
|| NIL_P (prefix) || NIL_P (prefix_color) || NIL_P (visible))
{
@@ -6003,10 +5658,6 @@ weechat_ruby_api_nicklist_search_nick (VALUE class, VALUE buffer,
RUBY_RETURN_EMPTY;
}
- c_buffer = NULL;
- c_from_group = NULL;
- c_name = NULL;
-
if (NIL_P (buffer) || NIL_P (from_group) || NIL_P (name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_search_nick");
@@ -6275,11 +5926,6 @@ weechat_ruby_api_nicklist_group_set (VALUE class, VALUE buffer, VALUE group,
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
- c_group = NULL;
- c_property = NULL;
- c_value = NULL;
-
if (NIL_P (buffer) || NIL_P (group) || NIL_P (property) || NIL_P (value))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_set");
@@ -6446,11 +6092,6 @@ weechat_ruby_api_nicklist_nick_set (VALUE class, VALUE buffer, VALUE nick,
RUBY_RETURN_ERROR;
}
- c_buffer = NULL;
- c_nick = NULL;
- c_property = NULL;
- c_value = NULL;
-
if (NIL_P (buffer) || NIL_P (nick) || NIL_P (property) || NIL_P (value))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
@@ -6494,8 +6135,6 @@ weechat_ruby_api_bar_item_search (VALUE class, VALUE name)
RUBY_RETURN_EMPTY;
}
- c_name = NULL;
-
if (NIL_P (name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "bar_item_search");
@@ -6567,10 +6206,6 @@ weechat_ruby_api_bar_item_new (VALUE class, VALUE name, VALUE function,
RUBY_RETURN_EMPTY;
}
- c_name = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (name) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "bar_item_new");
@@ -6682,8 +6317,6 @@ weechat_ruby_api_bar_search (VALUE class, VALUE name)
RUBY_RETURN_EMPTY;
}
- c_name = NULL;
-
if (NIL_P (name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "bar_search");
@@ -6726,22 +6359,6 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
RUBY_RETURN_EMPTY;
}
- c_name = NULL;
- c_hidden = NULL;
- c_priority = NULL;
- c_type = NULL;
- c_conditions = NULL;
- c_position = NULL;
- c_filling_top_bottom = NULL;
- c_filling_left_right = NULL;
- c_size = NULL;
- c_size_max = NULL;
- c_color_fg = NULL;
- c_color_delim = NULL;
- c_color_bg = NULL;
- c_separator = NULL;
- c_items = NULL;
-
if (NIL_P (name) || NIL_P (hidden) || NIL_P (priority) || NIL_P (type)
|| NIL_P (conditions) || NIL_P (position) || NIL_P (filling_top_bottom)
|| NIL_P (filling_left_right) || NIL_P (size) || NIL_P (size_max)
@@ -7631,9 +7248,6 @@ weechat_ruby_api_upgrade_new (VALUE class, VALUE filename, VALUE write)
RUBY_RETURN_EMPTY;
}
- c_filename = NULL;
- c_write = 0;
-
if (NIL_P (filename) || NIL_P (write))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "upgrade_new");
@@ -7762,10 +7376,6 @@ weechat_ruby_api_upgrade_read (VALUE class, VALUE upgrade_file,
RUBY_RETURN_INT(0);
}
- c_upgrade_file = NULL;
- c_function = NULL;
- c_data = NULL;
-
if (NIL_P (upgrade_file) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "upgrade_read");