Skip to content

Commit

Permalink
Pass non-null argc,argv to PERL_SYS_INIT
Browse files Browse the repository at this point in the history
Fixes a segfault on Win32, but not the "Aborted" issue...
  • Loading branch information
sorear committed Oct 16, 2011
1 parent 6c08103 commit d468f8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/p5embed.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ xs_init(pTHX)
static PerlInterpreter *my_perl; static PerlInterpreter *my_perl;
void p5embed_initialize() void p5embed_initialize()
{ {
PERL_SYS_INIT3(0,NULL,NULL); int argc = 1;
char *argv0[] = { "perl", NULL, 0 };
char **argv = argv0;
PERL_SYS_INIT(&argc,&argv);
my_perl = perl_alloc(); my_perl = perl_alloc();
perl_construct(my_perl); perl_construct(my_perl);
char *embedding[] = { "", "-e", "0" }; char *embedding[] = { "", "-e", "0" };
Expand Down

0 comments on commit d468f8f

Please sign in to comment.