mirror of
https://github.com/weechat/weechat.git
synced 2026-06-20 01:54:46 +02:00
api: do not expect any return value in callbacks change/delete of config_new_option (scripting API)
This commit is contained in:
@@ -1195,10 +1195,9 @@ weechat_python_api_config_option_change_cb (const void *pointer, void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
struct t_plugin_script *script;
|
||||
void *func_argv[2];
|
||||
void *func_argv[2], *rc;
|
||||
char empty_arg[1] = { '\0' };
|
||||
const char *ptr_function, *ptr_data;
|
||||
int *rc;
|
||||
|
||||
script = (struct t_plugin_script *)pointer;
|
||||
plugin_script_get_function_and_data (data, &ptr_function, &ptr_data);
|
||||
@@ -1208,10 +1207,10 @@ weechat_python_api_config_option_change_cb (const void *pointer, void *data,
|
||||
func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg;
|
||||
func_argv[1] = (char *)API_PTR2STR(option);
|
||||
|
||||
rc = (int *) weechat_python_exec (script,
|
||||
WEECHAT_SCRIPT_EXEC_INT,
|
||||
ptr_function,
|
||||
"ss", func_argv);
|
||||
rc = weechat_python_exec (script,
|
||||
WEECHAT_SCRIPT_EXEC_IGNORE,
|
||||
ptr_function,
|
||||
"ss", func_argv);
|
||||
|
||||
if (rc)
|
||||
free (rc);
|
||||
@@ -1223,10 +1222,9 @@ weechat_python_api_config_option_delete_cb (const void *pointer, void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
struct t_plugin_script *script;
|
||||
void *func_argv[2];
|
||||
void *func_argv[2], *rc;
|
||||
char empty_arg[1] = { '\0' };
|
||||
const char *ptr_function, *ptr_data;
|
||||
int *rc;
|
||||
|
||||
script = (struct t_plugin_script *)pointer;
|
||||
plugin_script_get_function_and_data (data, &ptr_function, &ptr_data);
|
||||
@@ -1236,10 +1234,10 @@ weechat_python_api_config_option_delete_cb (const void *pointer, void *data,
|
||||
func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg;
|
||||
func_argv[1] = (char *)API_PTR2STR(option);
|
||||
|
||||
rc = (int *) weechat_python_exec (script,
|
||||
WEECHAT_SCRIPT_EXEC_INT,
|
||||
ptr_function,
|
||||
"ss", func_argv);
|
||||
rc = weechat_python_exec (script,
|
||||
WEECHAT_SCRIPT_EXEC_IGNORE,
|
||||
ptr_function,
|
||||
"ss", func_argv);
|
||||
|
||||
if (rc)
|
||||
free (rc);
|
||||
|
||||
Reference in New Issue
Block a user