@@ -16,41 +16,6 @@ ZEND_DECLARE_MODULE_GLOBALS(extname)
16
16
/* True global resources - no need for thread safety here */
17
17
static int le_extname ;
18
18
19
- /* {{{ extname_functions[]
20
- *
21
- * Every user visible function must have an entry in extname_functions[].
22
- */
23
- const zend_function_entry extname_functions [] = {
24
- PHP_FE (confirm_extname_compiled , NULL ) /* For testing, remove later. */
25
- /* __function_entries_here__ */
26
- PHP_FE_END /* Must be the last line in extname_functions[] */
27
- };
28
- /* }}} */
29
-
30
- /* {{{ extname_module_entry
31
- */
32
- zend_module_entry extname_module_entry = {
33
- #if ZEND_MODULE_API_NO >= 20010901
34
- STANDARD_MODULE_HEADER ,
35
- #endif
36
- "extname" ,
37
- extname_functions ,
38
- PHP_MINIT (extname ),
39
- PHP_MSHUTDOWN (extname ),
40
- PHP_RINIT (extname ), /* Replace with NULL if there's nothing to do at request start */
41
- PHP_RSHUTDOWN (extname ), /* Replace with NULL if there's nothing to do at request end */
42
- PHP_MINFO (extname ),
43
- #if ZEND_MODULE_API_NO >= 20010901
44
- "0.1" , /* Replace with version number for your extension */
45
- #endif
46
- STANDARD_MODULE_PROPERTIES
47
- };
48
- /* }}} */
49
-
50
- #ifdef COMPILE_DL_EXTNAME
51
- ZEND_GET_MODULE (extname )
52
- #endif
53
-
54
19
/* {{{ PHP_INI
55
20
*/
56
21
/* Remove comments and fill if you need to have entries in php.ini
@@ -61,6 +26,35 @@ PHP_INI_END()
61
26
*/
62
27
/* }}} */
63
28
29
+ /* Remove the following function when you have successfully modified config.m4
30
+ so that your module can be compiled into PHP, it exists only for testing
31
+ purposes. */
32
+
33
+ /* Every user-visible function in PHP should document itself in the source */
34
+ /* {{{ proto string confirm_extname_compiled(string arg)
35
+ Return a string to confirm that the module is compiled in */
36
+ PHP_FUNCTION (confirm_extname_compiled )
37
+ {
38
+ char * arg = NULL ;
39
+ int arg_len , len ;
40
+ char * strg ;
41
+
42
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "s" , & arg , & arg_len ) == FAILURE ) {
43
+ return ;
44
+ }
45
+
46
+ len = spprintf (& strg , 0 , "Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP." , "extname" , arg );
47
+ RETURN_STRINGL (strg , len , 0 );
48
+ }
49
+ /* }}} */
50
+ /* The previous line is meant for vim and emacs, so it can correctly fold and
51
+ unfold functions in source code. See the corresponding marks just before
52
+ function definition, where the functions purpose is also documented. Please
53
+ follow this convention for the convenience of others editing your code.
54
+ */
55
+
56
+ /* __function_stubs_here__ */
57
+
64
58
/* {{{ php_extname_init_globals
65
59
*/
66
60
/* Uncomment this function if you have INI entries
@@ -126,35 +120,36 @@ PHP_MINFO_FUNCTION(extname)
126
120
}
127
121
/* }}} */
128
122
123
+ /* {{{ extname_functions[]
124
+ *
125
+ * Every user visible function must have an entry in extname_functions[].
126
+ */
127
+ const zend_function_entry extname_functions [] = {
128
+ PHP_FE (confirm_extname_compiled , NULL ) /* For testing, remove later. */
129
+ /* __function_entries_here__ */
130
+ PHP_FE_END /* Must be the last line in extname_functions[] */
131
+ };
132
+ /* }}} */
129
133
130
- /* Remove the following function when you have successfully modified config.m4
131
- so that your module can be compiled into PHP, it exists only for testing
132
- purposes. */
133
-
134
- /* Every user-visible function in PHP should document itself in the source */
135
- /* {{{ proto string confirm_extname_compiled(string arg)
136
- Return a string to confirm that the module is compiled in */
137
- PHP_FUNCTION (confirm_extname_compiled )
138
- {
139
- char * arg = NULL ;
140
- int arg_len , len ;
141
- char * strg ;
142
-
143
- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "s" , & arg , & arg_len ) == FAILURE ) {
144
- return ;
145
- }
146
-
147
- len = spprintf (& strg , 0 , "Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP." , "extname" , arg );
148
- RETURN_STRINGL (strg , len , 0 );
149
- }
134
+ /* {{{ extname_module_entry
135
+ */
136
+ zend_module_entry extname_module_entry = {
137
+ STANDARD_MODULE_HEADER ,
138
+ "extname" ,
139
+ extname_functions ,
140
+ PHP_MINIT (extname ),
141
+ PHP_MSHUTDOWN (extname ),
142
+ PHP_RINIT (extname ), /* Replace with NULL if there's nothing to do at request start */
143
+ PHP_RSHUTDOWN (extname ), /* Replace with NULL if there's nothing to do at request end */
144
+ PHP_MINFO (extname ),
145
+ "0.1" , /* Replace with version number for your extension */
146
+ STANDARD_MODULE_PROPERTIES
147
+ };
150
148
/* }}} */
151
- /* The previous line is meant for vim and emacs, so it can correctly fold and
152
- unfold functions in source code. See the corresponding marks just before
153
- function definition, where the functions purpose is also documented. Please
154
- follow this convention for the convenience of others editing your code.
155
- */
156
149
157
- /* __function_stubs_here__ */
150
+ #ifdef COMPILE_DL_EXTNAME
151
+ ZEND_GET_MODULE (extname )
152
+ #endif
158
153
159
154
/*
160
155
* Local variables:
0 commit comments