|
|
Author: jhorwitz
Date: Fri Jul 25 12:56:10 2008
New Revision: 392
Modified:
mod_parrot/trunk/include/modparrot_config.h
mod_parrot/trunk/src/modparrot_config.c
mod_parrot/trunk/src/module.c
Log:
add missing directive signature types
Modified: mod_parrot/trunk/include/modparrot_config.h
==============================================================================
--- mod_parrot/trunk/include/modparrot_config.h (original)
+++ mod_parrot/trunk/include/modparrot_config.h Fri Jul 25 12:56:10 2008
@@ -33,6 +33,12 @@
# 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)
+# define MP_INIT_CMD_RAW_ARGS(c) (c.func.raw_args = \
+ modparrot_module_cmd_raw_args)
+# define MP_INIT_CMD_NO_ARGS(c) (c.func.no_args =
modparrot_module_cmd_no_args)
+# define MP_INIT_CMD_ITERATE(c) (c.func.take1 = modparrot_module_cmd_iterate)
+# define MP_INIT_CMD_ITERATE2(c) (c.func.take2 =
modparrot_module_cmd_iterate2)
+# define MP_INIT_CMD_FLAG(c) (c.func.flag = modparrot_module_cmd_flag)
#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)
@@ -40,6 +46,11 @@
# 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)
+# define MP_INIT_CMD_RAW_ARGS(c) (c.func = modparrot_module_cmd_raw_args)
+# define MP_INIT_CMD_NO_ARGS(c) (c.func = modparrot_module_cmd_no_args)
+# define MP_INIT_CMD_ITERATE(c) (c.func = modparrot_module_cmd_iterate)
+# define MP_INIT_CMD_ITERATE2(c) (c.func = modparrot_module_cmd_iterate2)
+# define MP_INIT_CMD_FLAG(c) (c.func = modparrot_module_cmd_flag)
#endif /* (AP_HAVE_DESIGNATED_INITIALIZER) || defined(DOXYGEN) */
/* configuration */
@@ -153,5 +164,11 @@
const char *, const char*);
const char *modparrot_module_cmd_take123(cmd_parms *, void *, const char *,
const char *, const char*);
+const char *modparrot_module_cmd_raw_args(cmd_parms *, void *, const char *);
+const char *modparrot_module_cmd_flag(cmd_parms *, void *, int);
+const char *modparrot_module_cmd_iterate(cmd_parms *, void *, const char *);
+const char *modparrot_module_cmd_iterate2(cmd_parms *, void *, const char *,
+ const char *);
+const char *modparrot_module_cmd_no_args(cmd_parms *, void *);
#endif /* _MODPARROT_CONFIG_H */
Modified: mod_parrot/trunk/src/modparrot_config.c
==============================================================================
--- mod_parrot/trunk/src/modparrot_config.c (original)
+++ mod_parrot/trunk/src/modparrot_config.c Fri Jul 25 12:56:10 2008
@@ -684,3 +684,69 @@
ret = Parrot_call_sub_ret_int(ctxp->interp, data->func, "IP", args);
return NULL;
}
+
+const char *modparrot_module_cmd_raw_args(cmd_parms *cmd, void *mconfig,
+ const char *arg)
+{
+ modparrot_context *ctxp;
+ Parrot_PMC args;
+ modparrot_module_cmd_data *data = cmd->cmd->cmd_data;
+ int ret;
+
+ ctxp = modparrot_startup(cmd->pool, cmd->server, NULL);
+ args = make_cmd_args_array(ctxp->interp, cmd->pool, 1, arg);
+ ret = Parrot_call_sub_ret_int(ctxp->interp, data->func, "IP", args);
+ return NULL;
+}
+
+const char *modparrot_module_cmd_flag(cmd_parms *cmd, void *mconfig, int arg)
+{
+ modparrot_context *ctxp;
+ Parrot_PMC args;
+ modparrot_module_cmd_data *data = cmd->cmd->cmd_data;
+ int ret;
+
+ ctxp = modparrot_startup(cmd->pool, cmd->server, NULL);
+ ret = Parrot_call_sub_ret_int(ctxp->interp, data->func, "II", arg);
+ return NULL;
+}
+
+const char *modparrot_module_cmd_iterate(cmd_parms *cmd, void *mconfig,
+ const char *arg)
+{
+ modparrot_context *ctxp;
+ Parrot_PMC args;
+ modparrot_module_cmd_data *data = cmd->cmd->cmd_data;
+ int ret;
+
+ ctxp = modparrot_startup(cmd->pool, cmd->server, NULL);
+ args = make_cmd_args_array(ctxp->interp, cmd->pool, 1, arg);
+ ret = Parrot_call_sub_ret_int(ctxp->interp, data->func, "IP", args);
+ return NULL;
+}
+
+const char *modparrot_module_cmd_iterate2(cmd_parms *cmd, void *mconfig,
+ const char *arg1,
+ const char *arg2)
+{
+ modparrot_context *ctxp;
+ Parrot_PMC args;
+ modparrot_module_cmd_data *data = cmd->cmd->cmd_data;
+ int ret;
+
+ ctxp = modparrot_startup(cmd->pool, cmd->server, NULL);
+ args = make_cmd_args_array(ctxp->interp, cmd->pool, 2, arg1, arg2);
+ ret = Parrot_call_sub_ret_int(ctxp->interp, data->func, "IP", args);
+ return NULL;
+}
+
+const char *modparrot_module_cmd_no_args(cmd_parms *cmd, void *mconfig)
+{
+ modparrot_context *ctxp;
+ modparrot_module_cmd_data *data = cmd->cmd->cmd_data;
+ int ret;
+
+ ctxp = modparrot_startup(cmd->pool, cmd->server, NULL);
+ ret = Parrot_call_sub_ret_int(ctxp->interp, data->func, "I");
+ return NULL;
+}
Modified: mod_parrot/trunk/src/module.c
==============================================================================
--- mod_parrot/trunk/src/module.c (original)
+++ mod_parrot/trunk/src/module.c Fri Jul 25 12:56:10 2008
@@ -106,6 +106,21 @@
case TAKE123:
MP_INIT_CMD_TAKE123(cmds[i]);
break;
+ case ITERATE:
+ MP_INIT_CMD_ITERATE(cmds[i]);
+ break;
+ case ITERATE2:
+ MP_INIT_CMD_ITERATE2(cmds[i]);
+ break;
+ case FLAG:
+ MP_INIT_CMD_FLAG(cmds[i]);
+ break;
+ case NO_ARGS:
+ MP_INIT_CMD_NO_ARGS(cmds[i]);
+ break;
+ case RAW_ARGS:
+ MP_INIT_CMD_RAW_ARGS(cmds[i]);
+ break;
default: /* XXX how do we error out here??? */
break;
}
|
|