cvs: php4 /ext/skeleton create_stubs

From: Date: Sun, 12 Aug 2001 02:45:44 +0000
Subject: cvs: php4 /ext/skeleton create_stubs
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6750@lists.php.net to get a copy of this message
andrei Sat Aug 11 22:45:44 2001 EDT Modified files: /php4/ext/skeleton create_stubs Log: Fix it up a bit. Index: php4/ext/skeleton/create_stubs diff -u php4/ext/skeleton/create_stubs:1.16 php4/ext/skeleton/create_stubs:1.17 --- php4/ext/skeleton/create_stubs:1.16 Sat Aug 11 20:14:48 2001 +++ php4/ext/skeleton/create_stubs Sat Aug 11 22:45:41 2001 @@ -114,21 +114,18 @@ argnames[num_funcs,args_max] = arg_name args_max++ - spec_str = spec_str spec_map[arg_type] if (optional) { - optionals[num_funcs,i] = optional - if (arg_type != "resource") { - useswitch[num_funcs] = 1 + if (!spec_opt) { + spec_str = spec_str "|" + spec_opt = 1 } + optionals[num_funcs,i] = optional } else { - args_min++ + args_min++ } + spec_str = spec_str spec_map[arg_type] if (x = gobble("\\[")) { - if (!spec_opt) { - spec_str = spec_str "|" - spec_opt = 1 - } optional++ } @@ -180,13 +177,17 @@ " <funcprototype>\n" \ " <funcdef>" types[i] " <function>" funcs[i] "</function></funcdef>\n" - fetchargs = "\tif (zend_parse_parameters(ZEND_NUM_ARGS(), " specs[i] ", " + fetchargs = "\tif (zend_parse_parameters(" + if (spec_opt) { + ints = ints "\tint argc = ZEND_NUM_ARGS();\n" + fetchargs = fetchargs "argc" + } else + fetchargs = fetchargs "ZEND_NUM_ARGS()" + fetchargs = fetchargs ", " specs[i] for (j = 0; j < maxargs[i]; j++) { - if (j) { - fetchargs = fetchargs ", " - } + fetchargs = fetchargs ", " fetchargs = fetchargs "&" argnames[i,j] if (argtypes[i,j] == "string") {

« previous php.cvs (#6750) next »