X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlcall.pod;h=40f1d65a7beb4ec286e32a97a6cc850b081b9e63;hb=c23d1eb0e18a49361001d26c686323d50b0c6d21;hp=148b24b51bdd18ea9a4fd4c541b63214f254039d;hpb=4a4eefd0ee0da7b6a2b5b0d021684bca80971b79;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlcall.pod b/pod/perlcall.pod index 148b24b..40f1d65 100644 --- a/pod/perlcall.pod +++ b/pod/perlcall.pod @@ -201,8 +201,8 @@ As with G_SCALAR, this flag has 2 effects: =item 1. -It indicates to the subroutine being called that it is executing in an -array context (if it executes I the result will be true). +It indicates to the subroutine being called that it is executing in a +list context (if it executes I the result will be true). =item 2. @@ -355,7 +355,7 @@ use of this flag. As mentioned above, you can determine the context of the currently executing subroutine in Perl with I. The equivalent test can be made in C by using the C macro, which returns -C if you have been called in an array context, C if +C if you have been called in a list context, C if in a scalar context, or C if in a void context (i.e. the return value will not be used). An older version of this macro is called C; in a void context it returns C instead of @@ -589,12 +589,6 @@ local copy, I the global copy. =item 4. -The only flag specified this time is G_DISCARD. Because we are passing 2 -parameters to the Perl subroutine this time, we have not specified -G_NOARGS. - -=item 5. - Next, we come to XPUSHs. This is where the parameters actually get pushed onto the stack. In this case we are pushing a string and an integer. @@ -602,7 +596,7 @@ integer. See L for details on how the XPUSH macros work. -=item 6. +=item 5. Because we created temporary values (by means of sv_2mortal() calls) we will have to tidy up the Perl stack and dispose of mortal SVs. @@ -632,10 +626,12 @@ to limit the scope of local variables. See the section I for details of an alternative to using these macros. -=item 7. +=item 6. -Finally, I can now be called via the I -function. +Finally, I can now be called via the I function. +The only flag specified this time is G_DISCARD. Because we are passing +2 parameters to the Perl subroutine this time, we have not specified +G_NOARGS. =back @@ -806,7 +802,7 @@ Notes =item 1. -We wanted array context, so G_ARRAY was used. +We wanted list context, so G_ARRAY was used. =item 2.