com php/gtk-src: Make the generator not spit with PHP 5.4: generator/Getopt.php generator/generator.php
[email protected] (Elizabeth Marie Smith) Mon, 16 Jul 2012 18:18:58 +0000
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 9209524468b76b066af2c678947188aab5aa9794=0AAuthor: Elizabeth = M Smith <[email protected]> Mon, 16 Jul 2012 14:18:58 -0400= =0AParents: bbd9401776b2007f0765f4b4fde9000bb2c51305=0ABranches: master= =0A=0ALink: http://git.php.net/?p=3Dphp/gtk-src.git;a=3Dcommitdiff;h= =3D9209524468b76b066af2c678947188aab5aa9794=0A=0ALog:=0AMake the generator = not spit with PHP 5.4=0A=0AChanged paths:=0A M generator/Getopt.php=0A M= generator/generator.php=0A=0A=0ADiff:=0Adiff --git a/generator/Getopt.php= b/generator/Getopt.php=0Aindex 7dd41fb..3ff2586 100644=0A--- a/generator/G= etopt.php=0A+++ b/generator/Getopt.php=0A@@ -62,7 +62,7 @@ class Console_Ge= topt {=0A * @access public=0A *=0A */=0A- function getopt= ($args, $short_options, $long_options =3D null)=0A+ static public functi= on getopt($args, $short_options, $long_options =3D null)=0A {=0A = $opts =3D array();=0A $non_opts =3D array();=0A@@ -100,7 +100= ,7 @@ class Console_Getopt {=0A * @access private=0A *=0A */= =0A- function _parseShortOption($arg, $short_options, &$opts, &$args)=0A= + static private function _parseShortOption($arg, $short_options, &$opts= , &$args)=0A {=0A for ($i =3D 0; $i < strlen($arg); $i++) {=0A = $opt =3D $arg{$i};=0A@@ -142,7 +142,7 @@ class Console_Getopt {= =0A * @access private=0A *=0A */=0A- function _parseLongO= ption($arg, $long_options, &$opts, &$args)=0A+ static private function _= parseLongOption($arg, $long_options, &$opts, &$args)=0A {=0A li= st($opt, $opt_arg) =3D explode('=3D', $arg);=0A $opt_len =3D strlen= ($opt);=0A@@ -183,6 +183,4 @@ class Console_Getopt {=0A =0A return = false;=0A }=0A-}=0A-=0A-?>=0A+}=0A\ No newline at end of file=0Adiff --= git a/generator/generator.php b/generator/generator.php=0Aindex b28cfa0..66= 4836d 100644=0A--- a/generator/generator.php=0A+++ b/generator/generator.ph= p=0A@@ -607,8 +607,8 @@ class Generator {=0A $total =3D $this->fp->= get_total();=0A $current =3D 0;=0A while($current < $total)= {=0A- $register_classes .=3D '=09phpg_' . $this->lprefix . = $current . "_register_classes();\n";=0A- $this->fp->write_he= ader('=09void phpg_' . $this->lprefix . $current . "_register_classes(void)= ;\n");=0A+ $register_classes .=3D '=09phpg_' . $this->lprefi= x . $current . "_register_classes(TSRMLS_C);\n";=0A+ $this->= fp->write_header('void phpg_' . $this->lprefix . $current . "_register_clas= ses(TSRMLS_D);\n");=0A $current++;=0A }=0A = /* write the "meta" register class */=0A@@ -921,7 +921,7 @@ class Generator= {=0A =0A $function_arginfos =3D '';=0A =0A- = $object =3D null;=0A+ $object =3D new stdclass;=0A $object-= >in_module =3D $this->prefix;=0A $object->c_name =3D $this->prefix;= =0A =0A@@ -1189,6 +1189,7 @@ class Generator {=0A function getReflectio= nFuncName($method, $class, $det_method_name =3D null)=0A {=0A i= f ($method =3D=3D=3D null) {=0A+ $method =3D new stdclass;=0A = $method->name =3D $det_method_name;=0A }=0A retur= n 'arginfo_' . strtolower($class->in_module) . '_' . strtolower($class->c_n= ame) . '_'. $method->name;=0A