@@ -45,12 +45,29 @@ HOW TO USE IT
4545
4646 --proto=filename.
4747
48+ SOURCE AND HEADER FILE NAME
49+
50+ ./ext_skel generates 'module_name.c' and 'php_module_name.h' as main source
51+ and header files. Keep these names.
52+
53+ Module functions (User functions) must be named
54+
55+ module_name_function()
56+
57+ When you need to expose module functions to other modules, expose functions
58+ strictly needed by others. Exposed internal function must be named
59+
60+ php_module_name_function()
61+
62+ See also CODING_STANDARDS.
63+
64+
4865FORMAT OF FUNCTION DEFINITIONS FILE
4966
5067 All the definitions must be on one line. In it's simplest form, it's just
5168 the function name, e.g.
5269
53- my_function
70+ module_name_function
5471
5572 but then you'll be left with an almost empty function body without any
5673 argument handling.
@@ -72,8 +89,9 @@ FORMAT OF FUNCTION DEFINITIONS FILE
7289
7390 An example:
7491
75- my_function (int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st
92+ module_name_function (int arg1, int arg2 [, int arg3 [, int arg4]])
7693
94+ Arguments arg1 and arg2 are required.
7795 Arguments arg3 and arg4 are optional.
7896
7997 If possible, the function definition should also contain it's return type
@@ -133,15 +151,15 @@ EXAMPLE
133151
134152 The following _one_ line
135153
136- bool my_drawtext (resource image, string text, resource font, int x, int y [, int color])
154+ bool module_name_drawtext (resource image, string text, resource font, int x, int y [, int color])
137155
138156 will create this function definition for you (note that there are a few
139157 question marks to be replaced by you, and you must of course add your own
140158 value definitions too):
141159
142- /* {{{ proto bool my_drawtext (resource image, string text, resource font, int x, int y [, int color])
160+ /* {{{ proto bool module_name_drawtext (resource image, string text, resource font, int x, int y [, int color])
143161 */
144- PHP_FUNCTION(my_drawtext )
162+ PHP_FUNCTION(module_name_drawtext )
145163{
146164 char *text = NULL;
147165 int argc = ZEND_NUM_ARGS();
@@ -164,7 +182,7 @@ PHP_FUNCTION(my_drawtext)
164182 ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id);
165183 }
166184
167- php_error(E_WARNING, "my_drawtext : not yet implemented");
185+ php_error(E_WARNING, "module_name_drawtext : not yet implemented");
168186}
169187/* }}} */
170188
0 commit comments