Leser: 1
3 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
void doit(void)
{
dSP;
char *reserved;
SV *result;
ENTER;
SAVETMPS;
PUSHMARK(SP);
PUTBACK;
perl_call_pv("func1", G_ARRAY);
SPAGAIN;
result = POPs;
reserved = SvPV(result, PL_na);
printf("%s\n",reserved);
PUTBACK;
FREETMPS;
LEAVE;
}
int main (int argc, char *argv[], char *env)
{
my_perl = perl_alloc();
PERL_SYS_INIT3(&argc, &argv,&env);
perl_construct(my_perl);
perl_parse(my_perl, NULL,argc, argv,(char **)NULL);
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
perl_run(my_perl);
doit();
perl_destruct(my_perl);
perl_free(my_perl);
PERL_SYS_TERM();
}
3 Einträge, 1 Seite |