Readers: 44
|< 1 2 >| | 12 entries, 2 pages |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include "stdafx.h" #include "perl.h" static PerlInterpreter *my_perl; int _tmain(int argc, _TCHAR* argv[]) { char *args[] = { "", "-e", "0" }; my_perl = perl_alloc(); perl_construct( my_perl ); perl_parse( my_perl, NULL, 3, args, (char **)NULL ); perl_run( my_perl ); perl_destruct( my_perl ); perl_free( my_perl ); return 0; }
#include <EXTERN.h>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include "stdafx.h" #include "perl.h" static PerlInterpreter *my_perl; int _tmain(int argc, _TCHAR* argv[]) { PERL_SYS_INIT(&argc, (char***) &argv); my_perl = perl_alloc(); perl_construct( my_perl ); perl_parse( my_perl, NULL, argc, (char**) argv, (char **)NULL ); perl_run( my_perl ); perl_destruct( my_perl ); perl_free( my_perl ); PERL_SYS_TERM(); return 0; }
1 2 3
PERL_CALLCONV void Perl_sys_init(int* argc, char*** argv) __attribute__nonnull__(1) __attribute__nonnull__(2);
1 2 3 4 5 6
void Perl_sys_init(int* argc, char*** argv) { PERL_UNUSED_ARG(argc); /* may not be used depending on _BODY macro */ PERL_UNUSED_ARG(argv); PERL_SYS_INIT_BODY(argc, argv); }
2009-03-26T17:50:11 warpBloß habe ich noch nicht erkannt, was PERL_SYS_INIT() tut. Laut meiner IDE steckt hinter diesem Makro die Funktion Perl_sys_init(), die so aussieht:
Code (cpp): (dl )1 2 3PERL_CALLCONV void Perl_sys_init(int* argc, char*** argv) __attribute__nonnull__(1) __attribute__nonnull__(2);
|< 1 2 >| | 12 entries, 2 pages |