andrei Mon Jan 17 17:51:37 2005 EDT
Modified files:
/php-gtk/ext/gtk+ gtk.defs
/php-gtk/generator generator.php
Log:
- Fix static constructor generation.
- Adjust GtkComboBox and GtkComboBoxEntry static constructors so they
are not in the Gtk:: namespace, but rather in GtkComboBox:: and such.
http://cvs.php.net/diff.php/php-gtk/ext/gtk+/gtk.defs?r1=1.24&r2=1.25&ty=u
Index: php-gtk/ext/gtk+/gtk.defs
diff -u php-gtk/ext/gtk+/gtk.defs:1.24 php-gtk/ext/gtk+/gtk.defs:1.25
--- php-gtk/ext/gtk+/gtk.defs:1.24 Sun Jan 16 23:08:26 2005
+++ php-gtk/ext/gtk+/gtk.defs Mon Jan 17 17:51:32 2005
@@ -3272,6 +3272,7 @@
(define-function combo_box_new_text
(c-name "gtk_combo_box_new_text")
+ (is-constructor-of "GtkComboBox")
(return-type "GtkWidget*")
)
@@ -3341,6 +3342,7 @@
(define-function combo_box_entry_new_with_model
(c-name "gtk_combo_box_entry_new_with_model")
+ (is-constructor-of "GtkComboBoxEntry")
(return-type "GtkWidget*")
(parameters
'("GtkTreeModel*" "model")
@@ -3365,6 +3367,7 @@
(define-function combo_box_entry_new_text
(c-name "gtk_combo_box_entry_new_text")
+ (is-constructor-of "GtkComboBoxEntry")
(return-type "GtkWidget*")
)
http://cvs.php.net/diff.php/php-gtk/generator/generator.php?r1=1.57&r2=1.58&ty=u
Index: php-gtk/generator/generator.php
diff -u php-gtk/generator/generator.php:1.57
php-gtk/generator/generator.php:1.58
--- php-gtk/generator/generator.php:1.57 Mon Jan 17 16:27:51 2005
+++ php-gtk/generator/generator.php Mon Jan 17 17:51:37 2005
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: generator.php,v 1.57 2005/01/17 21:27:51 andrei Exp $ */
+/* $Id: generator.php,v 1.58 2005/01/17 22:51:37 andrei Exp $ */
/*
* Significant portions of this generator are based on the pygtk code generator
@@ -589,11 +589,13 @@
if ($first) {
$ctor_fe_name = '__construct';
$flags = 'ZEND_ACC_PUBLIC';
+ $template = Templates::constructor_body;
} else {
// remove class name from the constructor name, i.e. turn
// gtk_button_new_with_mnemonic into new_with_mnemonic
$ctor_fe_name = substr($ctor_name,
strlen(convert_typename($ctor->is_constructor_of)));
$flags = 'ZEND_ACC_PUBLIC|ZEND_ACC_STATIC';
+ $template = Templates::static_constructor_body;
}
try {
@@ -604,11 +606,7 @@
fwrite($this->fp, $ctor_override . "\n");
} else {
$dict['name'] = $ctor_fe_name;
- $template = Templates::constructor_body;
- if ($ctor_fe_name != '__construct') {
- $template = Templates::static_constructor_body;
- }
- $code = $this->write_callable($ctor,
Templates::constructor_body, false, false, $dict);
+ $code = $this->write_callable($ctor, $template, false,
false, $dict);
fwrite($this->fp, $code);
}
$ctor_defs[] = sprintf(Templates::function_entry,
--
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|