logo       

cvs: php-gtk /ext/gtk+ gtk.defs /generator generator.php: msg#00017

Subject: cvs: php-gtk /ext/gtk+ gtk.defs /generator generator.php
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




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe