summaryrefslogtreecommitdiff
path: root/ext/standard/reg.h
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-05-12 15:40:15 +0000
committerSascha Schumann <sas@php.net>1999-05-12 15:40:15 +0000
commita4d20864a689eb7ee7a29c2b0b119fb53a361558 (patch)
treee071f7fd8f93c2e96bebb81fefb04cfab33e156f /ext/standard/reg.h
parent3031862b2450e48b29aeb2b0a30e4ac4110899a8 (diff)
downloadphp-git-a4d20864a689eb7ee7a29c2b0b119fb53a361558.tar.gz
- regex cache (needs some work)
- str_replace changes from php3
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 */