diff options
author | Stig Bakken <ssb@php.net> | 2000-03-06 20:37:11 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 2000-03-06 20:37:11 +0000 |
commit | 99e0b36321236c1bcf9d60c1e3ed07050b55a20f (patch) | |
tree | 624ad6ac28695d278db7a783626e44177a7d3924 /ext/ereg | |
parent | 031808cd1b0f584b9c37af5fc7edecf63977da10 (diff) | |
download | php-git-99e0b36321236c1bcf9d60c1e3ed07050b55a20f.tar.gz |
@Cleaned up extension namespace (Stig)
Cleaned up extension namespace, and changed ext/standard into one single
extension.
Diffstat (limited to 'ext/ereg')
-rw-r--r-- | ext/ereg/ereg.c | 30 | ||||
-rw-r--r-- | ext/ereg/php_ereg.h | 9 |
2 files changed, 11 insertions, 28 deletions
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index 1630bf7b94..f48413606f 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -24,24 +24,7 @@ #include "php_string.h" #include "reg.h" -unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; - -function_entry reg_functions[] = { - PHP_FE(ereg, third_argument_force_ref) - PHP_FE(ereg_replace, NULL) - PHP_FE(eregi, third_argument_force_ref) - PHP_FE(eregi_replace, NULL) - PHP_FE(split, NULL) - PHP_FALIAS(join, implode, NULL) - PHP_FE(sql_regcase, NULL) - {NULL, NULL, NULL} -}; - - -static PHP_MINIT_FUNCTION(regex); -static PHP_MSHUTDOWN_FUNCTION(regex); -static PHP_MINFO_FUNCTION(regex); - +#if 0 zend_module_entry regexp_module_entry = { "Regular Expressions", reg_functions, @@ -49,6 +32,7 @@ zend_module_entry regexp_module_entry = { NULL, NULL, PHP_MINFO(regex), STANDARD_MODULE_PROPERTIES }; +#endif #ifdef ZTS int reg_globals_id; @@ -101,7 +85,7 @@ static void php_reg_init_globals(php_reg_globals *reg_globals) zend_hash_init(®_globals->ht_rc, 0, NULL, (void (*)(void *)) _free_reg_cache, 1); } -static PHP_MINIT_FUNCTION(regex) +PHP_MINIT_FUNCTION(regex) { #ifdef ZTS reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), (ts_allocate_ctor) php_reg_init_globals, NULL); @@ -112,7 +96,7 @@ static PHP_MINIT_FUNCTION(regex) return SUCCESS; } -static PHP_MSHUTDOWN_FUNCTION(regex) +PHP_MSHUTDOWN_FUNCTION(regex) { REGLS_FETCH(); @@ -120,12 +104,12 @@ static PHP_MSHUTDOWN_FUNCTION(regex) return SUCCESS; } -static PHP_MINFO_FUNCTION(regex) +PHP_MINFO_FUNCTION(regex) { #if HSREGEX - PUTS("Bundled regex library enabled\n"); + PUTS("Bundled regex library enabled<br>\n"); #else - PUTS("System regex library enabled\n"); + PUTS("System regex library enabled<br>\n"); #endif } diff --git a/ext/ereg/php_ereg.h b/ext/ereg/php_ereg.h index b7f8262d2f..0ffa7438bd 100644 --- a/ext/ereg/php_ereg.h +++ b/ext/ereg/php_ereg.h @@ -33,9 +33,6 @@ #ifndef _REG_H #define _REG_H -extern zend_module_entry regexp_module_entry; -#define regexp_module_ptr ®exp_module_entry - char *php_reg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended); PHP_FUNCTION(ereg); @@ -49,6 +46,10 @@ typedef struct { HashTable ht_rc; } php_reg_globals; +PHP_MINIT_FUNCTION(regex); +PHP_MSHUTDOWN_FUNCTION(regex); +PHP_MINFO_FUNCTION(regex); + #ifdef ZTS #define REGLS_D php_reg_globals *reg_globals @@ -66,6 +67,4 @@ typedef struct { #define REGLS_FETCH() #endif -#define phpext_regex_ptr regexp_module_ptr - #endif /* _REG_H */ |