X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlxs.pod;h=98a983422f1ebd55ac7776ef72cdecec399e3c25;hb=04251ce85fbe7037c3a7ca309ab31a0207c941b3;hp=c578a2ec59100907056a28fd0ab6c5dcc4c7981b;hpb=9cde0e7fb9816f759feaabc0f640403a7cdbc5c6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlxs.pod b/pod/perlxs.pod index c578a2e..98a9834 100644 --- a/pod/perlxs.pod +++ b/pod/perlxs.pod @@ -181,10 +181,10 @@ directive is used which sets ST(0) explicitly. Older versions of this document recommended to use C return value in such cases. It was discovered that this could lead to -segfaults in cases when XSUB was I C. This practice is +segfaults in cases when XSUB was I C. This practice is now deprecated, and may be not supported at some future version. Use the return value C in such cases. (Currently C contains -some heuristic code which tries to disambiguate between "truely-void" +some heuristic code which tries to disambiguate between "truly-void" and "old-practice-declared-as-void" functions. Hence your code is at mercy of this heuristics unless you use C as return value.) @@ -387,9 +387,9 @@ the same line where the input variable is declared. If the initialization begins with C<;> or C<+>, then it is output after all of the input variables have been declared. The C<=> and C<;> cases replace the initialization normally supplied from the typemap. -For the C<+> case, the initialization from the typemap will preceed +For the C<+> case, the initialization from the typemap will precede the initialization code included after the C<+>. A global -variable, C<%v>, is available for the truely rare case where +variable, C<%v>, is available for the truly rare case where information from one initialization is needed in another initialization. @@ -553,9 +553,10 @@ The XS code, with ellipsis, follows. time_t timep = NO_INIT PREINIT: char *host = "localhost"; + STRLEN n_a; CODE: if( items > 1 ) - host = (char *)SvPV(ST(1), PL_na); + host = (char *)SvPV(ST(1), n_a); RETVAL = rpcb_gettime( host, &timep ); OUTPUT: timep @@ -786,9 +787,10 @@ prototypes. PROTOTYPE: $;$ PREINIT: char *host = "localhost"; + STRLEN n_a; CODE: if( items > 1 ) - host = (char *)SvPV(ST(1), PL_na); + host = (char *)SvPV(ST(1), n_a); RETVAL = rpcb_gettime( host, &timep ); OUTPUT: timep @@ -1212,13 +1214,15 @@ getnetconfigent() XSUB and an object created by a normal Perl subroutine. The typemap is a collection of code fragments which are used by the B compiler to map C function parameters and values to Perl values. The typemap file may consist of three sections labeled C, C, and -C. The INPUT section tells the compiler how to translate Perl values +C. Any unlabelled initial section is assumed to be a C +section if a name is not explicitly specified. The INPUT section tells +the compiler how to translate Perl values into variables of certain C types. The OUTPUT section tells the compiler how to translate the values from certain C types into values Perl can understand. The TYPEMAP section tells the compiler which of the INPUT and OUTPUT code fragments should be used to map a given C type to a Perl value. -Each of the sections of the typemap must be preceded by one of the TYPEMAP, -INPUT, or OUTPUT keywords. +The section labels C, C, or C must begin +in the first column on a line by themselves, and must be in uppercase. The default typemap in the C directory of the Perl source contains many useful types which can be used by Perl extensions. Some extensions define