Some more hacks to make Perl work (the irony) on VC++

Originally committed to SVN as r1744.
This commit is contained in:
Rodrigo Braz Monteiro 2008-01-16 19:56:15 +00:00
parent b9c9782c76
commit 5fbe03e04e
1 changed files with 9 additions and 2 deletions

View File

@ -78,12 +78,19 @@ namespace Automation4 {
filename_pattern = _T("*") _T(PERL_SCRIPT_EXTENSION); filename_pattern = _T("*") _T(PERL_SCRIPT_EXTENSION);
// Perl interpreter initialization (ONE FOR ALL THE SCRIPTS) // Perl interpreter initialization (ONE FOR ALL THE SCRIPTS)
char** env = NULL;
int argc = 3;
char *argv[3] = { "aegisub", "-e", "0" };
#ifdef __WINDOWS__
char **argv2 = (char**) argv;
PERL_SYS_INIT3(&argc,&argv2,&env);
#endif
parser = perl_alloc(); parser = perl_alloc();
perl_construct(parser); perl_construct(parser);
char *_embedding[] = { "aegisub", "-e", "0" };
perl_parse(parser, xs_perl_main, perl_parse(parser, xs_perl_main,
3, _embedding, argc, argv,
NULL); NULL);
//free(argv);
// (That was pretty magic o_O) // (That was pretty magic o_O)
// Let's register the perl script factory \o/ // Let's register the perl script factory \o/