You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2004/07/11 19:01:24 UTC

[apreq-2] apreq_xs_tables.h

In APREQ_XS_DEFINE_TABLE_NEXTKEY of apreq_xs_tables.h,
VC++ (and I think some other compilers) want some
declarations happening earlier. This patch:
==========================================================
Index: glue/perl/xsbuilder/apreq_xs_tables.h
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_tables.h,v
retrieving revision 1.6
diff -u -r1.6 apreq_xs_tables.h
--- glue/perl/xsbuilder/apreq_xs_tables.h	11 Jul 2004 06:31:44 -0000	1.6
+++ glue/perl/xsbuilder/apreq_xs_tables.h	11 Jul 2004 16:54:13 -0000
@@ -238,12 +238,13 @@
 {                                                                       \
     dXSARGS;                                                            \
     SV *obj;                                                            \
+    const apr_array_header_t *arr;                                      \
+    apr_table_entry_t *te;                                              \
     if (!SvROK(ST(0)))                                                  \
         Perl_croak(aTHX_ "Usage: $table->NEXTKEY($prev)");              \
     obj = apreq_xs_find_obj(aTHX_ ST(0), #attr);                        \
-    const apr_array_header_t *arr = apr_table_elts(                     \
-                                    apreq_xs_##attr##_sv2table(obj));   \
-    apr_table_entry_t *te = (apr_table_entry_t *)arr->elts;             \
+    arr = apr_table_elts(apreq_xs_##attr##_sv2table(obj));              \
+    te = (apr_table_entry_t *)arr->elts;                                \
                                                                         \
     if (items == 1)                                                     \
         SvCUR(obj) = 0;                                                 \

=========================================================================
works for me.

-- 
best regards,
randy

Re: [apreq-2] apreq_xs_tables.h

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:

> In APREQ_XS_DEFINE_TABLE_NEXTKEY of apreq_xs_tables.h,
> VC++ (and I think some other compilers) want some
> declarations happening earlier.

Thanks Randy- should be fixed in cvs now.

-- 
Joe Schaefer