]> granicus.if.org Git - php/commitdiff
make sure the function name in the proto matches the function
authorHartmut Holzgraefe <hholzgra@php.net>
Sat, 15 Mar 2003 22:34:32 +0000 (22:34 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Sat, 15 Mar 2003 22:34:32 +0000 (22:34 +0000)
scripts/ext_skel_ng/php_function.php

index e6cc4ce0a161d46f52b588d4ab9330f73f2e4290..33bdfbf038b7fe2b471efacdf0b91e1e1b2868d2 100644 (file)
                        $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++) {