develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #116296] [PATCH] remove PL_patchlevel from and optimize S_minus_v

Thread Next
Tony Cook via RT
July 5, 2013 07:01
[perl #116296] [PATCH] remove PL_patchlevel from and optimize S_minus_v
Message ID:
On Fri Jan 04 09:37:10 2013, bulk88 wrote:
> See attached patch.

This patch no longer applies.

I can see a couple of places it could be improved:

+		    level = Perl_newSVpvf_nocontext("%s", num);

Couldn't this just be:

  level = newSVpvn(num, num_len);

-		Perl_form(aTHX_ "\nThis is perl, %"SVf"\n",
-		    SVfARG(vstringify(PL_patchlevel))));
+		Perl_form(aTHX_ "\nThis is perl, " "v" PERL_VERSION_STRING "\n");

Why is Perl_form() being called here?

#elif defined(UNDER_CE)
 			"WINCE port by Rainer Keuchel, 2001-2002\n"
 			"Built on " __DATE__ " " __TIME__ "\n\n");
-#ifdef __SYMBIAN32__
-	PerlIO_printf(PIO_stdout,
-		      "Symbian port by Nokia, 2004-2005\n");
+#elif defined(__SYMBIAN32__)
+		      "Symbian port by Nokia, 2004-2005\n"
+#endif /* end of additional copyright lines */
+#  ifndef UNDER_CE
+	); /* close Larry Wall copyright printf */
+#  endif
+#elif defined(UNDER_CE) /* because of wce_hitreturn() open new printf */
+	PerlIO_printf(PIO_stdout,
+/* else CPP catenation continues from Larry Wall copyright printf */

The contortions to handle UNDER_CE ending the PerlIO_printf() are
confusing.  Wouldn't it be better to put the wce_hitreturn() in it's own
#ifdef UNDER_CE ?


via perlbug:  queue: perl5 status: new

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About