-x should be C<-x>, reported by Gerben Wierda.
[p5sagit/p5-mst-13.2.git] / pod / perlxs.pod
index 1eea753..2e02247 100644 (file)
@@ -372,7 +372,7 @@ and C<$type> can be used as in typemaps.
 
      bool_t
      rpcb_gettime(host,timep)
-          char *host = (char *)SvPV($arg,na);
+          char *host = (char *)SvPV($arg,PL_na);
           time_t &timep = 0;
           OUTPUT:
           timep
@@ -396,7 +396,7 @@ initialization.
      bool_t
      rpcb_gettime(host,timep)
           time_t &timep ; /*\$v{time}=@{[$v{time}=$arg]}*/
-          char *host + SvOK($v{time}) ? SvPV($arg,na) : NULL;
+          char *host + SvOK($v{time}) ? SvPV($arg,PL_na) : NULL;
           OUTPUT:
           timep
 
@@ -555,7 +555,7 @@ The XS code, with ellipsis, follows.
           char *host = "localhost";
           CODE:
                  if( items > 1 )
-                      host = (char *)SvPV(ST(1), na);
+                      host = (char *)SvPV(ST(1), PL_na);
                  RETVAL = rpcb_gettime( host, &timep );
           OUTPUT:
           timep
@@ -681,7 +681,7 @@ return value, should the need arise.
                sv_setnv( ST(0), (double)timep);
           }
           else{
-               ST(0) = &sv_undef;
+               ST(0) = &PL_sv_undef;
           }
 
 To return an empty list one must use a PPCODE: block and
@@ -788,7 +788,7 @@ prototypes.
           char *host = "localhost";
           CODE:
                  if( items > 1 )
-                      host = (char *)SvPV(ST(1), na);
+                      host = (char *)SvPV(ST(1), PL_na);
                  RETVAL = rpcb_gettime( host, &timep );
           OUTPUT:
           timep
@@ -1212,13 +1212,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<xsubpp>
 compiler to map C function parameters and values to Perl values.  The
 typemap file may consist of three sections labeled C<TYPEMAP>, C<INPUT>, and
-C<OUTPUT>.  The INPUT section tells the compiler how to translate Perl values
+C<OUTPUT>.  Any unlabelled initial section is assumed to be a C<TYPEMAP>
+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<TYPEMAP>, C<INPUT>, or C<OUTPUT> must begin
+in the first column on a line by themselves, and must be in uppercase.
 
 The default typemap in the C<ext> directory of the Perl source contains many
 useful types which can be used by Perl extensions.  Some extensions define