summaryrefslogtreecommitdiff
path: root/execute.h
diff options
context:
space:
mode:
authorBen Fuhrmannek2016-02-24 23:33:34 +0100
committerBen Fuhrmannek2016-02-24 23:33:34 +0100
commitd4e9bb339360cb7d6ece5b1b60c08c8611bac19c (patch)
treeceb428cd6745b4363b25144f67304b7fbea212e2 /execute.h
parent346455c6b5716c8ce095235428614e15c0adf13e (diff)
executor improvements
Diffstat (limited to '')
-rw-r--r--execute.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/execute.h b/execute.h
new file mode 100644
index 0000000..03d19d3
--- /dev/null
+++ b/execute.h
@@ -0,0 +1,21 @@
1#pragma once
2
3#define S7_IH_HANDLER_PARAMS_REST INTERNAL_FUNCTION_PARAMETERS
4#define S7_IH_HANDLER_PARAMS suhosin_internal_function_handler *ih, S7_IH_HANDLER_PARAMS_REST
5#define S7_IH_HANDLER_PARAM_PASSTHRU ih, INTERNAL_FUNCTION_PARAM_PASSTHRU
6
7#define S7_IH_FN(fname) suhosin_ih_ ## fname
8#define S7_IH_FUNCTION(fname) int S7_IH_FN(fname)(S7_IH_HANDLER_PARAMS)
9#define S7_IH_ENTRY(php_fname, fname, arg1, arg2, arg3) { php_fname, S7_IH_FN(fname), (void*)(arg1), (void*)(arg2), (void*)(arg3) },
10#define S7_IH_ENTRY0(php_fname, fname) S7_IH_ENTRY(php_fname, fname, NULL, NULL, NULL)
11#define S7_IH_ENTRY0i(fname) S7_IH_ENTRY0(#fname, fname)
12
13typedef struct _suhosin_internal_function_handler {
14 char *name;
15 int (*handler)(struct _suhosin_internal_function_handler *ih, S7_IH_HANDLER_PARAMS_REST);
16 void *arg1;
17 void *arg2;
18 void *arg3;
19} suhosin_internal_function_handler;
20
21S7_IH_FUNCTION(preg_replace);