perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steve...@apache.org
Subject svn commit: r1733564 - /perl/modperl/trunk/xs/Apache2/RequestIO/Apache2__RequestIO.h
Date Fri, 04 Mar 2016 08:29:00 GMT
Author: stevehay
Date: Fri Mar  4 08:29:00 2016
New Revision: 1733564

URL: http://svn.apache.org/viewvc?rev=1733564&view=rev
Log:
Fix printf tests for perl-5.22 without ithreads support

The comment in r1702395 is wrong. It's not because of the thread context that the number of
arguments is wrong, it's because of the way WrapXS.pm handles functions with variable parameter
length (i.e. ... functions).

In the .xs code items is the number of elements in the MARK array. However when WrapXS.pm
generates code for a ... function, it will increment MARK, so that it points to the second
argument to the function. It will not, however decrement items, which means that items and
MARK now are out of sync. We suspect that MARK is incremented to skip the object that the
function is called on.

This patch updates the comment and removes the ifdef around the decrementation of items, which
solves the test failures for non-threaded perl 5.22.

Thanks to Klaus S. Madsen <ksm@jobindex.dk> for the patch.

Modified:
    perl/modperl/trunk/xs/Apache2/RequestIO/Apache2__RequestIO.h

Modified: perl/modperl/trunk/xs/Apache2/RequestIO/Apache2__RequestIO.h
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/xs/Apache2/RequestIO/Apache2__RequestIO.h?rev=1733564&r1=1733563&r2=1733564&view=diff
==============================================================================
--- perl/modperl/trunk/xs/Apache2/RequestIO/Apache2__RequestIO.h (original)
+++ perl/modperl/trunk/xs/Apache2/RequestIO/Apache2__RequestIO.h Fri Mar  4 08:29:00 2016
@@ -111,13 +111,11 @@ apr_size_t mpxs_ap_rprintf(pTHX_ I32 ite
 
     rcfg = modperl_config_req_get(r);
 
-    /* Reduce items by 1 for threaded builds since it otherwise includes
-     * the thread context, which shouldn't be included in the count of
-     * arguments being given to the sprintf() call.
+    /* Reduce items by 1 since it otherwise includes the
+     * Apache2::RequestRec object, which shouldn't be included in the
+     * count of arguments being given to the sprintf() call.
      */
-#ifdef USE_ITHREADS
     --items;
-#endif
 
     /* XXX: we could have an rcfg->sprintf_buffer to reuse this SV
      * across requests



Mime
View raw message