summaryrefslogtreecommitdiff
path: root/ext/standard/reg.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/reg.h')
-rw-r--r--ext/standard/reg.h39
1 files changed, 31 insertions, 8 deletions
diff --git a/ext/standard/reg.h b/ext/standard/reg.h
index bb33aa768f..011484bc4f 100644
--- a/ext/standard/reg.h
+++ b/ext/standard/reg.h
@@ -36,13 +36,36 @@
extern php3_module_entry regexp_module_entry;
#define regexp_module_ptr &regexp_module_entry
-extern char *_php3_regreplace(const char *pattern, const char *replace, const char *string, int icase, int extended);
-
-extern void php3_ereg(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_eregi(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_eregireplace(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_eregreplace(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_split(INTERNAL_FUNCTION_PARAMETERS);
-extern PHPAPI void php3_sql_regcase(INTERNAL_FUNCTION_PARAMETERS);
+char *_php3_regreplace(const char *pattern, const char *replace, const char *string, int icase, int extended);
+
+PHP_FUNCTION(ereg);
+PHP_FUNCTION(eregi);
+PHP_FUNCTION(eregireplace);
+PHP_FUNCTION(eregreplace);
+PHP_FUNCTION(split);
+PHP_FUNCTION(sql_regcase);
+
+typedef struct {
+ HashTable ht_rc;
+} php_reg_globals;
+
+
+#ifdef ZTS
+#define REGSLS_D php_reg_globals *reg_globals
+#define REGSLS_DC , REGSLS_D
+#define REGSLS_C reg_globals
+#define REGSLS_CC , REGSLS_C
+#define REG(v) (reg_globals->v)
+#define REGSLS_FETCH php_reg_globals *reg_globals = ts_resource(reg_globals_id);
+#else
+#define REGSLS_D
+#define REGSLS_DC
+#define REGSLS_C
+#define REGSLS_CC
+#define REG(v) (reg_globals.v)
+#define REGSLS_FETCH
+#endif
+
+#define phpext_regex_ptr regexp_module_ptr
#endif /* _REG_H */