#define PERL_SYS_INIT3(argc, argv, env) Perl_sys_init3(argc, argv, +env)
void Perl_sys_init3 (int *argc, char ***argv, char ***env) { extern int Perl___notused; (void) ((argc) || (_assert ("argc", "perl.c", 145), 0)); (void) ((argv) || (_assert ("argv", "perl.c", 145), 0)); (void) ((env) || (_assert ("env", "perl.c", 145), 0)); ((void) argc); ((void) argv); ((void) env); Perl_win32_init (argc, argv); InitializeCriticalSection (&(*Perl_Gperlio_mutex_ptr (0))); }
void Perl_win32_init (int *argcp, char ***argvp) { HMODULE module; _control87 (0x0008001f, 0x0008001f); #line 4840 "win32.c" ; InitCommonControls (); module = GetModuleHandleA ("ntdll.dll"); if (module) { *(FARPROC *) & pfnZwQuerySystemInformation = GetProcAddress (mod +ule, "ZwQuerySystemInformation"); } module = GetModuleHandleA ("kernel32.dll"); if (module) { *(FARPROC *) & pfnCreateToolhelp32Snapshot = GetProcAddress (mod +ule, "CreateToolhelp32Snapshot"); *(FARPROC *) & pfnProcess32First = GetProcAddress (module, "Proc +ess32First"); *(FARPROC *) & pfnProcess32Next = GetProcAddress (module, "Proce +ss32Next"); } g_osver.dwOSVersionInfoSize = sizeof (g_osver); GetVersionExA (&g_osver); ansify_path (); }
#define PERL_SYS_TERM() Perl_sys_term()
beforevoid Perl_sys_term () { extern int Perl___notused; if (!(*Perl_Gveto_cleanup_ptr (0))) { Perl_win32_term (); } }
aftervoid Perl_win32_term(void) { dTHX; HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM; }
I agree, terrible terrible description in perlapi. Perl 5.12.2 on windows above. Use the -P flag, and then a code formater. On some makefiles (XS/makemaker ones, not perl interpreter makefile) you can just type "nmake somecfile.i" and it will make the post preprocessed file, you still need to run it through a code formatter for it to be remotely readable. The Perl interpreter is the first interpreted programing language written completely in preprocessor macros jk jkvoid Perl_win32_term (void) { PerlInterpreter *my_perl = ((PerlInterpreter *) Perl_get_context ()) +; DeleteCriticalSection (&(*Perl_Ghints_mutex_ptr (0))); DeleteCriticalSection (&(*Perl_Gop_mutex_ptr (0))); do { PerlIO_teardown (); DeleteCriticalSection (&(*Perl_Gperlio_mutex_ptr (0))); } while (0); ; }
In reply to Re: what do PERL_SYS_INIT3() and PERL_SYS_TERM() do?
by patcat88
in thread what do PERL_SYS_INIT3() and PERL_SYS_TERM() do?
by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |