cvs: php4 /ext/skeleton create_stubs

From: Date: Sat, 15 Dec 2001 14:19:13 +0000
Subject: cvs: php4 /ext/skeleton create_stubs
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8651@lists.php.net to get a copy of this message
hholzgra Sat Dec 15 09:19:13 2001 EDT Modified files: /php4/ext/skeleton create_stubs Log: improved xml generatioimproved xml generation Index: php4/ext/skeleton/create_stubs diff -u php4/ext/skeleton/create_stubs:1.21 php4/ext/skeleton/create_stubs:1.22 --- php4/ext/skeleton/create_stubs:1.21 Wed Dec 12 15:49:44 2001 +++ php4/ext/skeleton/create_stubs Sat Dec 15 09:19:13 2001 @@ -20,7 +20,7 @@ if (type == "int" || type == "long") { longs = longs "\tlong " name ";\n" - } else if (type == "bool") { + } else if (type == "bool" || (type == "boolean") { bools = bools "\tzend_bool " name ";\n" } else if (type == "double" || type == "float") { doubles = doubles "\tdouble " name ";\n" @@ -29,7 +29,7 @@ ints = ints "\tint " name "_len;\n" } else if (type == "array" || type == "object" || type == "mixed") { zvals = zvals "\tzval *" name " = NULL;\n" - } else if (type == "resource") { + } else if (type == "resource" || type == "handle") { zvals = zvals "\tzval *" name " = NULL;\n" resources = resources "\tif (" name ") {\n" \ "\t\tZEND_FETCH_RESOURCE(???, ???, " name ", " name "_id, \"???\", ???_rsrc_id);\n\t}\n" @@ -48,8 +48,8 @@ BEGIN { name = "[_A-Za-z][_A-Za-z0-9]*" - type = "int|long|double|float|string|bool|array|object|resource|mixed|void" - spec = "l|l|d|d|s|b|a|o|r|z|" + type = "int|long|double|float|string|bool|boolean|array|object|resource|handle|mixed|void" + spec = "l|l|d|d|s|b|b|a|o|r|r|z|" num_funcs = 0 # create a map from type name to the spec @@ -66,13 +66,16 @@ } - xmlhead = " <reference id=\"ref." extname "\">\n" \ + xmlhead = "<?xml version='1.0' encoding='iso-8859-1'?>\n" \ + "<!-- $Revision: 1.22 $ -->\n" \ + " <reference id=\"ref." extname "\">\n" \ " <title> functions</title>\n" \ " <titleabbrev></titleabbrev>\n\n" \ " <partintro>\n" \ - " <para>\n" \ - " </para>\n" \ - " </partintro>\n\n"; + " &warn.experimental;\n" \ + " <para>\n" \ + " </para>\n" \ + " </partintro>\n\n"; xmlfoot = " </reference>\n\n" \ "<!-- Keep this comment at the end of the file\n" \ @@ -84,7 +87,7 @@ "sgml-always-quote-attributes:t\n" \ "sgml-indent-step:1\n" \ "sgml-indent-data:t\n" \ - "indent-tabs-mode:nil" \ + "indent-tabs-mode:nil\n" \ "sgml-parent-document:nil\n" \ "sgml-default-dtd-file:\"../../manual.ced\"\n" \ "sgml-exposed-tags:nil\n" \ @@ -186,8 +189,10 @@ fetchargs = "\tif (zend_parse_parameters(" ints = ints "\tint argc = ZEND_NUM_ARGS();\n" fetchargs = fetchargs "argc TSRMLS_CC, " specs[i] - } else + } else { fetchargs = fetchargs "\tif (ZEND_NUM_ARGS() != 0) {\n\t\tWRONG_PARAM_COUNT;\n\t}" + xmlparams = xmlparams " <void/>\n" + } for (j = 0; j < maxargs[i]; j++) { @@ -198,16 +203,16 @@ fetchargs = fetchargs ", &" argnames[i,j] "_len" } - xmlparams = xmlparams " <paramdef>" argtypes[i,j] + xmlparams = xmlparams " <paramdef>" argtypes[i,j] if (j > minargs[i]-1) { if (!grouped_optional_param[i,j-1]) { if (j > 0) proto = proto " " proto = proto "[" closeopts = closeopts "]" } - xmlparams = xmlparams "\n <parameter><optional>" \ + xmlparams = xmlparams "\n <parameter><optional>" \ argnames[i,j] \ - "</optional></parameter>\n </paramdef>\n" + "</optional></parameter>\n </paramdef>\n" } else { xmlparams = xmlparams \ " <parameter>" \ @@ -229,7 +234,9 @@ xmlstr = xmlstr xmlparams \ " </funcprototype>\n" \ " </funcsynopsis>\n" \ + " &warn.experimental.func;\n" \ " <para>\n" \ + " &warn.undocumented.func;\n" \ " </para>\n" \ " </refsect1>\n" \ " </refentry>\n"

« previous php.cvs (#8651) next »