summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/scripts/perl/weechat-perl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c
index ce53758cf..67df60742 100644
--- a/src/plugins/scripts/perl/weechat-perl.c
+++ b/src/plugins/scripts/perl/weechat-perl.c
@@ -112,7 +112,7 @@ void *
weechat_perl_exec (struct t_plugin_script *script,
int ret_type, const char *function, char **argv)
{
- const char *func;
+ char *func;
unsigned int count;
void *ret_value;
int *ret_i, mem_err, length;
@@ -124,11 +124,11 @@ weechat_perl_exec (struct t_plugin_script *script,
#ifdef MULTIPLICITY
(void) length;
- func = function;
+ func = (char *) function;
PERL_SET_CONTEXT (script->interpreter);
#else
length = strlen (script->interpreter) + strlen (function) + 3;
- func = malloc (length);
+ func = (char *) malloc (length);
if (!func)
return NULL;
snprintf (func, length, "%s::%s", (char *) script->interpreter, function);
@@ -628,10 +628,12 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
#ifdef PERL_SYS_INIT3
int a = perl_args_count;
+ char **perl_args_local = perl_args;
char *perl_env[] = {};
(void) a;
+ (void) perl_args_local;
(void) perl_env;
- PERL_SYS_INIT3 (&a, (char ***)&perl_args, (char ***)&perl_env);
+ PERL_SYS_INIT3 (&a, (char ***)&perl_args_local, (char ***)&perl_env);
#endif
weechat_perl_plugin = plugin;