X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/b017ed238008af06e2764e644dee23e72b0847ec..fa861958788779f82cb4c14d67b583bc18a75ef9:/pod/perlxs.pod diff --git a/pod/perlxs.pod b/pod/perlxs.pod index a6e21a3..afff655 100644 --- a/pod/perlxs.pod +++ b/pod/perlxs.pod @@ -319,7 +319,7 @@ CPAN modules) in the typemap file, the reference count of the C is not properly decremented. Thus, the above XSUB would leak memory whenever it is being called. The same problem exists for C. -When you're returning an C or a C, you have make sure +When you're returning an C or a C, you have to make sure their reference count is decremented by making the AV or HV mortal: AV * @@ -1434,10 +1434,26 @@ The XS module can use INCLUDE: to pull that file into it. INCLUDE: Rpcb1.xsh If the parameters to the INCLUDE: keyword are followed by a pipe (C<|>) then -the compiler will interpret the parameters as a command. +the compiler will interpret the parameters as a command. This feature is +mildly deprecated in favour of the C directive, as documented +below. INCLUDE: cat Rpcb1.xsh | +Do not use this to run perl: C will run the perl that +happens to be the first in your path and not necessarily the same perl that is +used to run C. See L<"The INCLUDE_COMMAND: Keyword">. + +=head2 The INCLUDE_COMMAND: Keyword + +Runs the supplied command and includes its output into the current XS +document. C assigns special meaning to the C<$^X> token +in that it runs the same perl interpreter that is running C: + + INCLUDE_COMMAND: cat Rpcb1.xsh + + INCLUDE_COMMAND: $^X -e ... + =head2 The CASE: Keyword The CASE: keyword allows an XSUB to have multiple distinct parts with each @@ -1945,7 +1961,7 @@ and the module version number. =item typedef my_cxt_t -This struct typedef I always be called C -- the other +This struct typedef I always be called C. The other C macros assume the existence of the C typedef name. Declare a typedef named C that is a structure that contains @@ -1964,7 +1980,7 @@ of C. The MY_CXT_INIT macro initialises storage for the C struct. -It I be called exactly once -- typically in a BOOT: section. If you +It I be called exactly once, typically in a BOOT: section. If you are maintaining multiple interpreters, it should be called once in each interpreter instance, except for interpreters cloned from existing ones. (But see C below.)