Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 37 lines (31 sloc) 0.814 kB
4994ff0 Add missing files.
Paweł Murias authored
1 #include <stdio.h>
2 #include <EXTERN.h>
3 #include <perl.h>
4
5 /* So that we can load XS using modules from our perl */
6 EXTERN_C void xs_init (pTHX);
7
8 EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
9
10 EXTERN_C void
11 xs_init(pTHX)
12 {
13 char *file = __FILE__;
14 dXSUB_SYS;
15
16 /* DynaLoader is a special case */
17 newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
18 }
19
20 static PerlInterpreter *my_perl;
21 int run_test()
22 {
23 int argc = 1;
24 char *argv0[] = { "perl", NULL, 0 };
25 char **argv = argv0;
26 PERL_SYS_INIT(&argc,&argv);
27 my_perl = perl_alloc();
28 perl_construct(my_perl);
29 char *embedding[] = { "", "-e", "0" };
30 perl_parse(my_perl, xs_init, 3, embedding, NULL);
31 PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
32 eval_pv("print \"OK 6\\n\"",TRUE);
33 perl_destruct(my_perl);
34 perl_free(my_perl);
35 PERL_SYS_TERM();
36 }
Something went wrong with that request. Please try again.