mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-29 03:17:53 -04:00
[perl] static char[]
This commit is contained in:
parent
f56e4f09f3
commit
feac3151f3
@ -95,13 +95,16 @@ init_perl(struct module *module)
|
|||||||
* Is passing @environ strictly needed ? --Zas */
|
* Is passing @environ strictly needed ? --Zas */
|
||||||
|
|
||||||
/* PERL_SYS_INIT3 may not be defined, it depends on the system. */
|
/* PERL_SYS_INIT3 may not be defined, it depends on the system. */
|
||||||
|
|
||||||
|
static char c_empty[] = "";
|
||||||
|
|
||||||
#ifdef PERL_SYS_INIT3
|
#ifdef PERL_SYS_INIT3
|
||||||
char *my_argvec[] = { NULL, NULL };
|
char *my_argvec[] = { NULL, NULL };
|
||||||
char **my_argv = my_argvec;
|
char **my_argv = my_argvec;
|
||||||
int my_argc = 0;
|
int my_argc = 0;
|
||||||
|
|
||||||
/* A hack to prevent unused variables warnings. */
|
/* A hack to prevent unused variables warnings. */
|
||||||
my_argv[my_argc++] = "";
|
my_argv[my_argc++] = c_empty;
|
||||||
|
|
||||||
PERL_SYS_INIT3(&my_argc, &my_argv, &environ);
|
PERL_SYS_INIT3(&my_argc, &my_argv, &environ);
|
||||||
#endif
|
#endif
|
||||||
@ -110,8 +113,8 @@ init_perl(struct module *module)
|
|||||||
if (my_perl) {
|
if (my_perl) {
|
||||||
char *hook_global = get_global_hook_file();
|
char *hook_global = get_global_hook_file();
|
||||||
char *hook_local = get_local_hook_file();
|
char *hook_local = get_local_hook_file();
|
||||||
char *global_argv[] = { "", hook_global};
|
char *global_argv[] = { c_empty, hook_global};
|
||||||
char *local_argv[] = { "", hook_local};
|
char *local_argv[] = { c_empty, hook_local};
|
||||||
int err = 1;
|
int err = 1;
|
||||||
|
|
||||||
perl_construct(my_perl);
|
perl_construct(my_perl);
|
||||||
|
Loading…
Reference in New Issue
Block a user