This patch allows $r->print($scalarref) to work in mod_perl 2, as it does 
currently in mod_perl 1.

-- 
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. <http://www.theiqgroup.com/>
Index: xs/modperl_xs_util.h
===================================================================
RCS file: /home/cvspublic/modperl-2.0/xs/modperl_xs_util.h,v
retrieving revision 1.12
diff -u -r1.12 modperl_xs_util.h
--- xs/modperl_xs_util.h        14 May 2002 03:12:56 -0000      1.12
+++ xs/modperl_xs_util.h        1 Oct 2002 19:47:58 -0000
@@ -83,8 +83,11 @@
 #define mpxs_write_loop(func,obj) \
     while (MARK <= SP) { \
         apr_ssize_t wlen; \
-        char *buf = SvPV(*MARK, wlen); \
-        apr_status_t rv = func(obj, buf, &wlen); \
+        apr_status_t rv; \
+        char *buf; \
+        SV *marksv = (SvROK(*MARK)) ? SvRV(*MARK) : *MARK; \
+        buf = SvPV(marksv, wlen); \
+        rv = func(obj, buf, &wlen); \
         if (rv != APR_SUCCESS) { \
             Perl_croak(aTHX_ modperl_apr_strerror(rv)); \
         } \

Attachment: msg03341/pgp00000.pgp
Description: PGP signature

Reply via email to