Change 34197 by [EMAIL PROTECTED] on 2008/08/10 21:54:00

        Purge C<n_a> thoughtcrime from the pods.

Affected files ...

... //depot/perl/pod/perlcall.pod#28 edit
... //depot/perl/pod/perlembed.pod#43 edit
... //depot/perl/pod/perlxs.pod#56 edit

Differences ...

==== //depot/perl/pod/perlcall.pod#28 (text) ====
Index: perl/pod/perlcall.pod
--- perl/pod/perlcall.pod#27~26073~     2005-11-10 02:52:51.000000000 -0800
+++ perl/pod/perlcall.pod       2008-08-10 14:54:00.000000000 -0700
@@ -904,8 +904,7 @@
         /* Check the eval first */
         if (SvTRUE(ERRSV))
         {
-           STRLEN n_a;
-            printf ("Uh oh - %s\n", SvPV(ERRSV, n_a));
+            printf ("Uh oh - %s\n", SvPV_nolen(ERRSV));
             POPs;
         }
         else
@@ -947,8 +946,7 @@
 
     if (SvTRUE(ERRSV))
     {
-       STRLEN n_a;
-        printf ("Uh oh - %s\n", SvPV(ERRSV, n_a));
+        printf ("Uh oh - %s\n", SvPV_nolen(ERRSV));
         POPs;
     }
 

==== //depot/perl/pod/perlembed.pod#43 (text) ====
Index: perl/pod/perlembed.pod
--- perl/pod/perlembed.pod#42~32026~    2007-10-04 07:28:34.000000000 -0700
+++ perl/pod/perlembed.pod      2008-08-10 14:54:00.000000000 -0700
@@ -313,7 +313,6 @@
 
    main (int argc, char **argv, char **env)
    {
-       STRLEN n_a;
        char *embedding[] = { "", "-e", "0" };
 
        PERL_SYS_INIT3(&argc,&argv,&env);
@@ -334,7 +333,7 @@
 
        /** Treat $a as a string **/
        eval_pv("$a = 'rekcaH lreP rehtonA tsuJ'; $a = reverse($a);", TRUE);
-       printf("a = %s\n", SvPV(get_sv("a", FALSE), n_a));
+       printf("a = %s\n", SvPV_nolen(get_sv("a", FALSE)));
 
        perl_destruct(my_perl);
        perl_free(my_perl);
@@ -357,9 +356,8 @@
 from I<eval_pv()> instead.  Example:
 
    ...
-   STRLEN n_a;
    SV *val = eval_pv("reverse 'rekcaH lreP rehtonA tsuJ'", TRUE);
-   printf("%s\n", SvPV(val,n_a));
+   printf("%s\n", SvPV_nolen(val));
    ...
 
 This way, we avoid namespace pollution by not creating global
@@ -406,7 +404,7 @@
  {
      dSP;
      SV* retval;
-     STRLEN n_a;
+
 
      PUSHMARK(SP);
      eval_sv(sv, G_SCALAR);
@@ -416,7 +414,7 @@
      PUTBACK;
 
      if (croak_on_error && SvTRUE(ERRSV))
-       croak(SvPVx(ERRSV, n_a));
+       croak(SvPVx_nolen(ERRSV));
 
      return retval;
  }
@@ -431,10 +429,9 @@
  I32 match(SV *string, char *pattern)
  {
      SV *command = newSV(0), *retval;
-     STRLEN n_a;
 
      sv_setpvf(command, "my $string = '%s'; $string =~ %s",
-             SvPV(string,n_a), pattern);
+             SvPV_nolen(string), pattern);
 
      retval = my_eval_sv(command, TRUE);
      SvREFCNT_dec(command);
@@ -453,10 +450,9 @@
  I32 substitute(SV **string, char *pattern)
  {
      SV *command = newSV(0), *retval;
-     STRLEN n_a;
 
      sv_setpvf(command, "$string = '%s'; ($string =~ %s)",
-             SvPV(*string,n_a), pattern);
+             SvPV_nolen(*string), pattern);
 
      retval = my_eval_sv(command, TRUE);
      SvREFCNT_dec(command);
@@ -477,10 +473,9 @@
  {
      SV *command = newSV(0);
      I32 num_matches;
-     STRLEN n_a;
 
      sv_setpvf(command, "my $string = '%s'; @array = ($string =~ %s)",
-             SvPV(string,n_a), pattern);
+             SvPV_nolen(string), pattern);
 
      my_eval_sv(command, TRUE);
      SvREFCNT_dec(command);
@@ -497,7 +492,6 @@
      AV *match_list;
      I32 num_matches, i;
      SV *text;
-     STRLEN n_a;
 
      PERL_SYS_INIT3(&argc,&argv,&env);
      my_perl = perl_alloc();
@@ -532,7 +526,7 @@
      printf("matches: m/(wi..)/g found %d matches...\n", num_matches);
 
      for (i = 0; i < num_matches; i++)
-       printf("match: %s\n", SvPV(*av_fetch(match_list, i, FALSE),n_a));
+       printf("match: %s\n", SvPV_nolen(*av_fetch(match_list, i, FALSE)));
      printf("\n");
 
      /** Remove all vowels from text **/
@@ -540,7 +534,7 @@
      if (num_matches) {
        printf("substitute: s/[aeiou]//gi...%d substitutions made.\n",
               num_matches);
-       printf("Now text is: %s\n\n", SvPV(text,n_a));
+       printf("Now text is: %s\n\n", SvPV_nolen(text));
      }
 
      /** Attempt a substitution **/
@@ -784,7 +778,6 @@
      char *args[] = { "", DO_CLEAN, NULL };
      char filename[BUFFER_SIZE];
      int exitstatus = 0;
-     STRLEN n_a;
 
      PERL_SYS_INIT3(&argc,&argv,&env);
      if((my_perl = perl_alloc()) == NULL) {
@@ -810,7 +803,7 @@
 
             /* check $@ */
             if(SvTRUE(ERRSV))
-                fprintf(stderr, "eval error: %s\n", SvPV(ERRSV,n_a));
+                fprintf(stderr, "eval error: %s\n", SvPV_nolen(ERRSV));
         }
      }
 

==== //depot/perl/pod/perlxs.pod#56 (text) ====
Index: perl/pod/perlxs.pod
--- perl/pod/perlxs.pod#55~34137~       2008-07-13 12:04:20.000000000 -0700
+++ perl/pod/perlxs.pod 2008-08-10 14:54:00.000000000 -0700
@@ -950,10 +950,9 @@
           time_t timep = NO_INIT
        PREINIT:
           char *host = "localhost";
-         STRLEN n_a;
         CODE:
          if( items > 1 )
-              host = (char *)SvPV(ST(1), n_a);
+              host = (char *)SvPV_nolen(ST(1));
          RETVAL = rpcb_gettime( host, &timep );
         OUTPUT:
           timep
@@ -1242,10 +1241,9 @@
        PROTOTYPE: $;$
        PREINIT:
           char *host = "localhost";
-         STRLEN n_a;
         CODE:
                  if( items > 1 )
-                      host = (char *)SvPV(ST(1), n_a);
+                      host = (char *)SvPV_nolen(ST(1));
                  RETVAL = rpcb_gettime( host, &timep );
         OUTPUT:
           timep
End of Patch.

Reply via email to