From: Hartmut Holzgraefe Date: Tue, 31 Oct 2000 11:30:11 +0000 (+0000) Subject: support for short comments was added to ext_skel proto files X-Git-Tag: php-4.0.4RC3~421 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c420d653ee4f25ab48d1111ed8a80d82e9f47a3d;p=php support for short comments was added to ext_skel proto files theese will be used in proto comments in the source and as information in the XML docs --- diff --git a/README.EXT_SKEL b/README.EXT_SKEL index cedda53c75..a887a85e5f 100644 --- a/README.EXT_SKEL +++ b/README.EXT_SKEL @@ -51,9 +51,13 @@ FORMAT OF FUNCTION DEFINITIONS FILE ']'s as there where '['s. Currently, it does not harm if you forget to do it or there is a wrong amount of ']'s, but this may change in the future. + An additional short description may be added after the parameters. + If present it will be filled into the 'proto' header comments in the stubs + code and the tag in the XML documentation. + An example: - my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) + my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st Arguments arg3 and arg4 are optional. diff --git a/ext/skeleton/create_stubs b/ext/skeleton/create_stubs index e302fe31be..f1af21fa1a 100755 --- a/ext/skeleton/create_stubs +++ b/ext/skeleton/create_stubs @@ -147,6 +147,11 @@ BEGIN { } } + if (x = gobble("\\)")) { + sub(/^[ \t]+/, "", line) + fcomments[num_funcs] = line + } + funcs[num_funcs] = func_name types[num_funcs] = func_type maxargs[num_funcs] = args_max @@ -171,7 +176,7 @@ END { xmlstr = " \n" \ " \n" \ " " funcs[i] "\n" \ - " \n" \ + " " fcomments[i] "\n" \ " \n" \ " \n" \ " Description\n" \ @@ -261,7 +266,7 @@ END { } } - proto = proto closeopts ")\n */\nPHP_FUNCTION(" funcs[i] ")\n{" + proto = proto closeopts ")\n " fcomments[i] " */\nPHP_FUNCTION(" funcs[i] ")\n{" if (maxargs[i]) { zvals = zvals ";" fetchargs = fetchargs ") == FAILURE)" closefetch "{\n\t\tWRONG_PARAM_COUNT;\n\t}\n"