Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (27 sloc) 0.778 kB
b5d1817 @kthakore New Mac Launcher
kthakore authored
1 #include <EXTERN.h> /* from the Perl distribution */
2 #include <perl.h> /* from the Perl distribution */
294052b @kthakore Fixed the bundle for mac
kthakore authored
3 #include <SDL.h>
b5d1817 @kthakore New Mac Launcher
kthakore authored
4
2cc5e57 @kthakore Fixed environ useage
kthakore authored
5 extern char **environ;
6
b5d1817 @kthakore New Mac Launcher
kthakore authored
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
20ebcf4 @kthakore Fixed signature of main for libSDLmain
kthakore authored
22 int main(int argc, char *argv[])
b5d1817 @kthakore New Mac Launcher
kthakore authored
23 {
433b86e @kthakore Added the environ back for perl
kthakore authored
24 char **env = environ;
2cc5e57 @kthakore Fixed environ useage
kthakore authored
25 PERL_SYS_INIT3(&argc,&argv, &env);
b5d1817 @kthakore New Mac Launcher
kthakore authored
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.