Skip to content
This repository
Newer
Older
100644 35 lines (27 sloc) 0.778 kb
b5d18175 »
2010-06-26 New Mac Launcher
1 #include <EXTERN.h> /* from the Perl distribution */
2 #include <perl.h> /* from the Perl distribution */
294052b6 »
2010-08-04 Fixed the bundle for mac
3 #include <SDL.h>
b5d18175 »
2010-06-26 New Mac Launcher
4
2cc5e570 »
2010-06-26 Fixed environ useage
5 extern char **environ;
6
b5d18175 »
2010-06-26 New Mac Launcher
7 static PerlInterpreter *my_perl; /* ** The Perl interpreter ***/
8 static void xs_init (pTHX);
9
10 EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
11
12 EXTERN_C void
13 xs_init(pTHX)
14 {
15 char *file = __FILE__;
16 /* DynaLoader is a special case */
17 newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
18 }
19
20
21
20ebcf41 »
2010-06-26 Fixed signature of main for libSDLmain
22 int main(int argc, char *argv[])
b5d18175 »
2010-06-26 New Mac Launcher
23 {
433b86e5 »
2010-06-26 Added the environ back for perl
24 char **env = environ;
2cc5e570 »
2010-06-26 Fixed environ useage
25 PERL_SYS_INIT3(&argc,&argv, &env);
b5d18175 »
2010-06-26 New Mac Launcher
26 my_perl = perl_alloc();
27 perl_construct(my_perl);
28 PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
29 perl_parse(my_perl, xs_init, argc, argv, (char **)NULL);
30 perl_run(my_perl);
31 perl_destruct(my_perl);
32 perl_free(my_perl);
33 PERL_SYS_TERM();
34 }
Something went wrong with that request. Please try again.