Skip to content

Commit 99e0b36

Browse files
committed
@cleaned up extension namespace (Stig)
Cleaned up extension namespace, and changed ext/standard into one single extension.
1 parent 031808c commit 99e0b36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+351
-583
lines changed

Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ configuration-parser.h configuration-parser.c: configuration-parser.y
5151
configuration-scanner.c: configuration-scanner.l
5252
$(LEX) -Pcfg -o$@ -i $<
5353

54+
internal_functions.c: internal_functions.c.in config.status
55+
CONFIG_FILES= CONFIG_HEADERS= ./config.status
56+
5457
.NOEXPORT:

ext/ereg/ereg.c

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,15 @@
2424
#include "php_string.h"
2525
#include "reg.h"
2626

27-
unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
28-
29-
function_entry reg_functions[] = {
30-
PHP_FE(ereg, third_argument_force_ref)
31-
PHP_FE(ereg_replace, NULL)
32-
PHP_FE(eregi, third_argument_force_ref)
33-
PHP_FE(eregi_replace, NULL)
34-
PHP_FE(split, NULL)
35-
PHP_FALIAS(join, implode, NULL)
36-
PHP_FE(sql_regcase, NULL)
37-
{NULL, NULL, NULL}
38-
};
39-
40-
41-
static PHP_MINIT_FUNCTION(regex);
42-
static PHP_MSHUTDOWN_FUNCTION(regex);
43-
static PHP_MINFO_FUNCTION(regex);
44-
27+
#if 0
4528
zend_module_entry regexp_module_entry = {
4629
"Regular Expressions",
4730
reg_functions,
4831
PHP_MINIT(regex), PHP_MSHUTDOWN(regex),
4932
NULL, NULL, PHP_MINFO(regex),
5033
STANDARD_MODULE_PROPERTIES
5134
};
35+
#endif
5236

5337
#ifdef ZTS
5438
int reg_globals_id;
@@ -101,7 +85,7 @@ static void php_reg_init_globals(php_reg_globals *reg_globals)
10185
zend_hash_init(&reg_globals->ht_rc, 0, NULL, (void (*)(void *)) _free_reg_cache, 1);
10286
}
10387

104-
static PHP_MINIT_FUNCTION(regex)
88+
PHP_MINIT_FUNCTION(regex)
10589
{
10690
#ifdef ZTS
10791
reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), (ts_allocate_ctor) php_reg_init_globals, NULL);
@@ -112,20 +96,20 @@ static PHP_MINIT_FUNCTION(regex)
11296
return SUCCESS;
11397
}
11498

115-
static PHP_MSHUTDOWN_FUNCTION(regex)
99+
PHP_MSHUTDOWN_FUNCTION(regex)
116100
{
117101
REGLS_FETCH();
118102

119103
zend_hash_destroy(&REG(ht_rc));
120104
return SUCCESS;
121105
}
122106

123-
static PHP_MINFO_FUNCTION(regex)
107+
PHP_MINFO_FUNCTION(regex)
124108
{
125109
#if HSREGEX
126-
PUTS("Bundled regex library enabled\n");
110+
PUTS("Bundled regex library enabled<br>\n");
127111
#else
128-
PUTS("System regex library enabled\n");
112+
PUTS("System regex library enabled<br>\n");
129113
#endif
130114
}
131115

ext/ereg/php_ereg.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
#ifndef _REG_H
3434
#define _REG_H
3535

36-
extern zend_module_entry regexp_module_entry;
37-
#define regexp_module_ptr &regexp_module_entry
38-
3936
char *php_reg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended);
4037

4138
PHP_FUNCTION(ereg);
@@ -49,6 +46,10 @@ typedef struct {
4946
HashTable ht_rc;
5047
} php_reg_globals;
5148

49+
PHP_MINIT_FUNCTION(regex);
50+
PHP_MSHUTDOWN_FUNCTION(regex);
51+
PHP_MINFO_FUNCTION(regex);
52+
5253

5354
#ifdef ZTS
5455
#define REGLS_D php_reg_globals *reg_globals
@@ -66,6 +67,4 @@ typedef struct {
6667
#define REGLS_FETCH()
6768
#endif
6869

69-
#define phpext_regex_ptr regexp_module_ptr
70-
7170
#endif /* _REG_H */

ext/standard/array.c

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
+----------------------------------------------------------------------+
1515
| Authors: Andi Gutmans <andi@zend.com> |
1616
| Zeev Suraski <zeev@zend.com> |
17+
| Rasmus Lerdorf <rasmus@php.net> |
18+
| Andrei Zmievski <andrei@ispi.net> |
1719
+----------------------------------------------------------------------+
1820
*/
1921

@@ -52,64 +54,6 @@ php_array_globals array_globals;
5254
#define SORT_DESC -1
5355
#define SORT_ASC 1
5456

55-
function_entry array_functions[] = {
56-
PHP_FE(ksort, first_arg_force_ref)
57-
PHP_FE(krsort, first_arg_force_ref)
58-
PHP_FE(asort, first_arg_force_ref)
59-
PHP_FE(arsort, first_arg_force_ref)
60-
PHP_FE(sort, first_arg_force_ref)
61-
PHP_FE(rsort, first_arg_force_ref)
62-
PHP_FE(usort, first_arg_force_ref)
63-
PHP_FE(uasort, first_arg_force_ref)
64-
PHP_FE(uksort, first_arg_force_ref)
65-
PHP_FE(shuffle, first_arg_force_ref)
66-
PHP_FE(array_walk, first_arg_force_ref)
67-
PHP_FE(count, first_arg_allow_ref)
68-
PHP_FE(end, first_arg_force_ref)
69-
PHP_FE(prev, first_arg_force_ref)
70-
PHP_FE(next, first_arg_force_ref)
71-
PHP_FE(reset, first_arg_force_ref)
72-
PHP_FE(current, first_arg_force_ref)
73-
PHP_FE(key, first_arg_force_ref)
74-
PHP_FE(min, NULL)
75-
PHP_FE(max, NULL)
76-
PHP_FE(in_array, NULL)
77-
PHP_FE(extract, NULL)
78-
PHP_FE(compact, NULL)
79-
PHP_FE(range, NULL)
80-
PHP_FE(array_multisort, NULL)
81-
PHP_FE(array_push, first_arg_force_ref)
82-
PHP_FE(array_pop, first_arg_force_ref)
83-
PHP_FE(array_shift, first_arg_force_ref)
84-
PHP_FE(array_unshift, first_arg_force_ref)
85-
PHP_FE(array_splice, first_arg_force_ref)
86-
PHP_FE(array_slice, NULL)
87-
PHP_FE(array_merge, NULL)
88-
PHP_FE(array_keys, NULL)
89-
PHP_FE(array_values, NULL)
90-
PHP_FE(array_count_values, NULL)
91-
PHP_FE(array_reverse, NULL)
92-
PHP_FE(array_pad, NULL)
93-
PHP_FE(array_flip, NULL)
94-
95-
/* Aliases */
96-
PHP_FALIAS(pos, current, first_arg_force_ref)
97-
PHP_FALIAS(sizeof, count, first_arg_allow_ref)
98-
99-
{NULL, NULL, NULL}
100-
};
101-
102-
zend_module_entry array_module_entry = {
103-
"Array Functions", /* extension name */
104-
array_functions, /* function list */
105-
PHP_MINIT(array), /* process startup */
106-
PHP_MSHUTDOWN(array), /* process shutdown */
107-
NULL, /* request startup */
108-
NULL, /* request shutdown */
109-
NULL, /* extension info */
110-
STANDARD_MODULE_PROPERTIES
111-
};
112-
11357
PHP_MINIT_FUNCTION(array)
11458
{
11559
#ifdef ZTS

ext/standard/assert.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,33 +53,6 @@ php_assert_globals assert_globals;
5353

5454
#define SAFE_STRING(s) ((s)?(s):"")
5555

56-
PHP_MINIT_FUNCTION(assert);
57-
PHP_MSHUTDOWN_FUNCTION(assert);
58-
PHP_RINIT_FUNCTION(assert);
59-
PHP_RSHUTDOWN_FUNCTION(assert);
60-
PHP_MINFO_FUNCTION(assert);
61-
62-
PHP_FUNCTION(assert);
63-
PHP_FUNCTION(assert_options);
64-
65-
static zend_function_entry php_assert_functions[] = {
66-
PHP_FE(assert, NULL)
67-
PHP_FE(assert_options, NULL)
68-
{NULL, NULL, NULL}
69-
};
70-
71-
72-
zend_module_entry assert_module_entry = {
73-
"Assertion",
74-
php_assert_functions,
75-
PHP_MINIT(assert),
76-
PHP_MSHUTDOWN(assert),
77-
PHP_RINIT(assert),
78-
PHP_RSHUTDOWN(assert),
79-
PHP_MINFO(assert),
80-
STANDARD_MODULE_PROPERTIES
81-
};
82-
8356
#define ASSERT_ACTIVE 1
8457
#define ASSERT_CALLBACK 2
8558
#define ASSERT_BAIL 3

0 commit comments

Comments
 (0)