perl.cvs.mod_parrot
[Top] [All Lists]

[svn:mod_parrot] r371 - in mod_parrot/trunk: include src

Subject: [svn:mod_parrot] r371 - in mod_parrot/trunk: include src
From: jhorwitz@xxxxxxxxxxxx
Date: Tue, 22 Jul 2008 14:17:25 -0700 (PDT)
Newsgroups: perl.cvs.mod_parrot

Author: jhorwitz
Date: Tue Jul 22 14:17:16 2008
New Revision: 371

Modified:
   mod_parrot/trunk/include/modparrot_config.h
   mod_parrot/trunk/src/module.c

Log:
fix issues with AP_HAVE_DESIGNATED INITIALIZER


Modified: mod_parrot/trunk/include/modparrot_config.h
==============================================================================
--- mod_parrot/trunk/include/modparrot_config.h (original)
+++ mod_parrot/trunk/include/modparrot_config.h Tue Jul 22 14:17:16 2008
@@ -25,6 +25,23 @@
 #define MP_OPT_PARENT 2
 #define MP_OPT_TRACE_INIT 4
 
+/* deal with absurdity from http_config.h */
+#if defined(AP_HAVE_DESIGNATED_INITIALIZER) || defined(DOXYGEN)
+#  define MP_INIT_CMD_TAKE1(c) (c.func.take1 = modparrot_module_cmd_take1)
+#  define MP_INIT_CMD_TAKE2(c) (c.func.take2 = modparrot_module_cmd_take2)
+#  define MP_INIT_CMD_TAKE12(c) (c.func.take2 = modparrot_module_cmd_take2)
+#  define MP_INIT_CMD_TAKE3(c) (c.func.take3 = modparrot_module_cmd_take3)
+#  define MP_INIT_CMD_TAKE23(c) (c.func.take3 = modparrot_module_cmd_take3)
+#  define MP_INIT_CMD_TAKE123(c) (c.func.take3 = modparrot_module_cmd_take3)
+#else /* (AP_HAVE_DESIGNATED_INITIALIZER) || defined(DOXYGEN) */
+#  define MP_INIT_CMD_TAKE1(c) (c.func = modparrot_module_cmd_take1)
+#  define MP_INIT_CMD_TAKE2(c) (c.func = modparrot_module_cmd_take2)
+#  define MP_INIT_CMD_TAKE12(c) (c.func = modparrot_module_cmd_take2)
+#  define MP_INIT_CMD_TAKE3(c) (c.func = modparrot_module_cmd_take3)
+#  define MP_INIT_CMD_TAKE23(c) (c.func = modparrot_module_cmd_take3)
+#  define MP_INIT_CMD_TAKE123(c) (c.func = modparrot_module_cmd_take3)
+#endif /* (AP_HAVE_DESIGNATED_INITIALIZER) || defined(DOXYGEN) */
+
 /* configuration */
 struct modparrot_handler_info
 {

Modified: mod_parrot/trunk/src/module.c
==============================================================================
--- mod_parrot/trunk/src/module.c       (original)
+++ mod_parrot/trunk/src/module.c       Tue Jul 22 14:17:16 2008
@@ -89,13 +89,22 @@
 
         switch(cmds[i].args_how) {
             case TAKE1:
-                cmds[i].func = modparrot_module_cmd_take1;
+                MP_INIT_CMD_TAKE1(cmds[i]);
+                break;
+            case TAKE2:
+                MP_INIT_CMD_TAKE2(cmds[i]);
                 break;
             case TAKE12:
-                cmds[i].func = modparrot_module_cmd_take12;
+                MP_INIT_CMD_TAKE12(cmds[i]);
+                break;
+            case TAKE3:
+                MP_INIT_CMD_TAKE3(cmds[i]);
+                break;
+            case TAKE23:
+                MP_INIT_CMD_TAKE23(cmds[i]);
                 break;
             case TAKE123:
-                cmds[i].func = modparrot_module_cmd_take123;
+                MP_INIT_CMD_TAKE123(cmds[i]);
                 break;
             default: /* XXX how do we error out here??? */
                 break;

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:mod_parrot] r371 - in mod_parrot/trunk: include src, jhorwitz <=