[svn:mod_parrot] r612 - mod_parrot/trunk/src

[email protected] Sun, 15 Feb 2009 07:33:28 -0800 (PST)
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Sun Feb 15 07:33:27 2009
New Revision: 612

Modified:
   mod_parrot/trunk/src/context.c

Log:
define APR_ARRAY_IDX if not defined by APR includes


Modified: mod_parrot/trunk/src/context.c
==============================================================================
--- mod_parrot/trunk/src/context.c	(original)
+++ mod_parrot/trunk/src/context.c	Sun Feb 15 07:33:27 2009
@@ -38,6 +38,11 @@
 apr_thread_mutex_t *ctx_pool_mutex;
 #endif /* MPM_IS_THREADED */
 
+/* APR_ARRAY_IDX seems to be missing in earlier apaches */
+#ifndef APR_ARRAY_IDX
+#define APR_ARRAY_IDX(ary,i,type) (((type*)(ary)->elts)[i])
+#endif /* APR_ARRAY_IDX */
+
 extern modparrot_globals mp_globals;
 
 /* initialize pool of contexts */