From: Niko Tyni Date: Thu, 2 Apr 2009 17:54:10 +0000 (+0300) Subject: Clarify PERL_SYS_INIT3() usage. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=31f6f5aa00011d88da3c64e4e1cb9629c8334dda;p=p5sagit%2Fp5-mst-13.2.git Clarify PERL_SYS_INIT3() usage. As seen in [perl #64326] and , the PERL_SYS_INIT3() documentation in perlembed.pod could be clearer about the macro arguments. --- diff --git a/pod/perlembed.pod b/pod/perlembed.pod index 161e1ce..36da54f 100644 --- a/pod/perlembed.pod +++ b/pod/perlembed.pod @@ -207,6 +207,10 @@ interpreter, and PERL_SYS_TERM() after you free your last interpreter. Since PERL_SYS_INIT3() may change C, it may be more appropriate to provide C as an argument to perl_parse(). +Also notice that no matter what arguments you pass to perl_parse(), +PERL_SYS_INIT3() must be invoked on the C main() argc, argv and env and +only once. + Now compile this program (I'll call it I) into an executable: % cc -o interp interp.c `perl -MExtUtils::Embed -e ccopts -e ldopts`