com php/gtk-src: Make the generator not spit with PHP 5.4: generator/Getopt.php generator/generator.php
| From: | Elizabeth Marie Smith | Date: | Mon, 16 Jul 2012 18:18:58 +0000 |
| Subject: | com php/gtk-src: Make the generator not spit with PHP 5.4: generator/Getopt.php generator/generator.php | ||
| Groups: | php.gtk.cvs | ||
| Request: | Send a blank email to php-gtk-cvs+get-4848@lists.php.net to get a copy of this message | ||
Commit: 9209524468b76b066af2c678947188aab5aa9794
Author: Elizabeth M Smith <auroraeosrose@gmail.com> Mon, 16 Jul 2012 14:18:58 -0400
Parents: bbd9401776b2007f0765f4b4fde9000bb2c51305
Branches: master
Link: http://git.php.net/?p=php/gtk-src.git;a=commitdiff;h=9209524468b76b066af2c678947188aab5aa9794
Log:
Make the generator not spit with PHP 5.4
Changed paths:
M generator/Getopt.php
M generator/generator.php
Diff:
diff --git a/generator/Getopt.php b/generator/Getopt.php
index 7dd41fb..3ff2586 100644
--- a/generator/Getopt.php
+++ b/generator/Getopt.php
@@ -62,7 +62,7 @@ class Console_Getopt {
* @access public
*
*/
- function getopt($args, $short_options, $long_options = null)
+ static public function getopt($args, $short_options, $long_options = null)
{
$opts = array();
$non_opts = array();
@@ -100,7 +100,7 @@ class Console_Getopt {
* @access private
*
*/
- function _parseShortOption($arg, $short_options, &$opts, &$args)
+ static private function _parseShortOption($arg, $short_options, &$opts, &$args)
{
for ($i = 0; $i < strlen($arg); $i++) {
$opt = $arg{$i};
@@ -142,7 +142,7 @@ class Console_Getopt {
* @access private
*
*/
- function _parseLongOption($arg, $long_options, &$opts, &$args)
+ static private function _parseLongOption($arg, $long_options, &$opts, &$args)
{
list($opt, $opt_arg) = explode('=', $arg);
$opt_len = strlen($opt);
@@ -183,6 +183,4 @@ class Console_Getopt {
return false;
}
-}
-
-?>
+}
\ No newline at end of file
diff --git a/generator/generator.php b/generator/generator.php
index b28cfa0..664836d 100644
--- a/generator/generator.php
+++ b/generator/generator.php
@@ -607,8 +607,8 @@ class Generator {
$total = $this->fp->get_total();
$current = 0;
while($current < $total) {
- $register_classes .= ' phpg_' . $this->lprefix . $current .
"_register_classes();\n";
- $this->fp->write_header(' void phpg_' . $this->lprefix .
$current . "_register_classes(void);\n");
+ $register_classes .= ' phpg_' . $this->lprefix . $current .
"_register_classes(TSRMLS_C);\n";
+ $this->fp->write_header('void phpg_' . $this->lprefix . $current
. "_register_classes(TSRMLS_D);\n");
$current++;
}
/* write the "meta" register class */
@@ -921,7 +921,7 @@ class Generator {
$function_arginfos = '';
- $object = null;
+ $object = new stdclass;
$object->in_module = $this->prefix;
$object->c_name = $this->prefix;
@@ -1189,6 +1189,7 @@ class Generator {
function getReflectionFuncName($method, $class, $det_method_name = null)
{
if ($method === null) {
+ $method = new stdclass;
$method->name = $det_method_name;
}
return 'arginfo_' . strtolower($class->in_module) . '_' .
strtolower($class->c_name) . '_'. $method->name;