[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] cvs: pecl /PECL_Gen Extension.php  /PECL_Gen/Element Class.php
From:       "Hartmut Holzgraefe" <hholzgra () php ! net>
Date:       2005-01-26 1:31:25
Message-ID: cvshholzgra1106703085 () cvsserver
[Download RAW message or body]

hholzgra		Tue Jan 25 20:31:25 2005 EDT

  Modified files:              
    /pecl/PECL_Gen	Extension.php 
    /pecl/PECL_Gen/Element	Class.php 
  Log:
  typo and thinko fixes
  
http://cvs.php.net/diff.php/pecl/PECL_Gen/Extension.php?r1=1.15&r2=1.16&ty=u
Index: pecl/PECL_Gen/Extension.php
diff -u pecl/PECL_Gen/Extension.php:1.15 pecl/PECL_Gen/Extension.php:1.16
--- pecl/PECL_Gen/Extension.php:1.15	Tue Jan 25 20:18:56 2005
+++ pecl/PECL_Gen/Extension.php	Tue Jan 25 20:31:23 2005
@@ -16,7 +16,7 @@
 // | Authors: Hartmut Holzgraefe <hholzgra@php.net>                       |
 // +----------------------------------------------------------------------+
 //
-// $Id: Extension.php,v 1.15 2005/01/26 01:18:56 hholzgra Exp $
+// $Id: Extension.php,v 1.16 2005/01/26 01:31:23 hholzgra Exp $
 //
 
 // {{{ includes
@@ -49,7 +49,7 @@
  * A class that generates PECL extension soure and documenation files
  *
  * @access  public
- * @version $Id: Extension.php,v 1.15 2005/01/26 01:18:56 hholzgra Exp $
+ * @version $Id: Extension.php,v 1.16 2005/01/26 01:31:23 hholzgra Exp $
  */
 
 class PECL_Gen_Extension 
@@ -1067,7 +1067,7 @@
         $code = "/* {{{ classes /*\n";
 
         foreach ($this->classes as $class) {
-            $code .= $class->global_code();
+            $code .= $class->global_code($this);
         }
 
         $code .= "/* }}} */\n\n";
@@ -1285,8 +1285,8 @@
         }
 
         if (count($this->classes)) {
-          foreach ($this->classes = $class) {
-            $code .= PECL_Gen_Tools_Indent::indent(4, $class->minit_code());
+          foreach ($this->classes as $class) {
+            $code .= PECL_Gen_Tools_Indent::indent(4, $class->minit_code($this));
           }
           $need_block = true;
         }
http://cvs.php.net/diff.php/pecl/PECL_Gen/Element/Class.php?r1=1.2&r2=1.3&ty=u
Index: pecl/PECL_Gen/Element/Class.php
diff -u pecl/PECL_Gen/Element/Class.php:1.2 pecl/PECL_Gen/Element/Class.php:1.3
--- pecl/PECL_Gen/Element/Class.php:1.2	Tue Jan 25 20:03:46 2005
+++ pecl/PECL_Gen/Element/Class.php	Tue Jan 25 20:31:25 2005
@@ -16,7 +16,7 @@
 // | Authors: Hartmut Holzgraefe <hholzgra@php.net>                       |
 // +----------------------------------------------------------------------+
 //
-// $Id: Class.php,v 1.2 2005/01/26 01:03:46 hholzgra Exp $
+// $Id: Class.php,v 1.3 2005/01/26 01:31:25 hholzgra Exp $
 //
 
     require_once "PECL/Gen/Tools/Indent.php";
@@ -87,16 +87,23 @@
 
         function global_code($extension) 
         {
-            $code = "";
+			return "
 
-            return $code;
+zend_class_entry * {$this->name}_ce_ptr = NULL;
+
+static class_init_{$this->name}() 
+{
+    zend_class_entry ce;
+    INIT_CLASS_ENTRY(ce, \"{$this->name}\", NULL);
+    {$this->name}_ce_ptr = zend_register_internal_class(&ce);
+}
+
+";
         }
 
         function minit_code($extension) 
         {
-            $code = "";
-
-            return $code;
+            return "class_init_{$this->name}();\n";
         }
         
 

-- 
PECL CVS Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic