Skip to content

Commit

Permalink
make sure the function name in the proto matches the function
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartmut Holzgraefe committed Mar 15, 2003
1 parent f60e894 commit e2b1372
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/ext_skel_ng/php_function.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ function parse_proto($proto) {
$return_type = ($this->is_type($tokens[$n])) ? $tokens[$n++] : "void";
if(! $this->is_name($tokens[$n])) return("$tokens[$n] is not a valid function name");
$function_name = $tokens[$n++];

if($function_name != $this->name) {
return "proto function name is '$function_name' instead of '{$this->name}'";
}

if($tokens[$n]!='(') return("'(' expected instead of '$tokens[$n]'");
if($tokens[++$n]!=')') {
for($param=0;$tokens[$n];$n++,$param++) {
Expand Down

0 comments on commit e2b1372

Please sign in to comment.