rrichards               Wed Mar 31 12:18:59 2004 EDT

  Modified files:              
    /php-src/ext/dom    attr.c cdatasection.c comment.c document.c 
                        documentfragment.c dom_fe.h element.c 
                        entityreference.c nodelist.c 
                        processinginstruction.c text.c xpath.c 
  Log:
  use new style constructors
  fix return for nodelist item
  
http://cvs.php.net/diff.php/php-src/ext/dom/attr.c?r1=1.12&r2=1.13&ty=u
Index: php-src/ext/dom/attr.c
diff -u php-src/ext/dom/attr.c:1.12 php-src/ext/dom/attr.c:1.13
--- php-src/ext/dom/attr.c:1.12 Mon Feb 16 08:06:33 2004
+++ php-src/ext/dom/attr.c      Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: attr.c,v 1.12 2004/02/16 13:06:33 rrichards Exp $ */
+/* $Id: attr.c,v 1.13 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -39,12 +39,12 @@
 
 zend_function_entry php_dom_attr_class_functions[] = {
        PHP_FALIAS(isId, dom_attr_is_id, NULL)
-       PHP_FALIAS(domattr, dom_attr_attr, NULL)
+       PHP_ME(domattr, __construct, NULL, ZEND_ACC_PUBLIC)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto domnode dom_attr_attr(string name, [string value]); */
-PHP_FUNCTION(dom_attr_attr)
+/* {{{ proto void DomAttr::__construct(string name, [string value]); */
+PHP_METHOD(domattr, __construct)
 {
 
        zval *id;
@@ -79,7 +79,7 @@
        }
 }
 
-/* }}} end dom_attr_attr */
+/* }}} end DomAttr::__construct */
 
 
 /* {{{ proto name      string  
http://cvs.php.net/diff.php/php-src/ext/dom/cdatasection.c?r1=1.7&r2=1.8&ty=u
Index: php-src/ext/dom/cdatasection.c
diff -u php-src/ext/dom/cdatasection.c:1.7 php-src/ext/dom/cdatasection.c:1.8
--- php-src/ext/dom/cdatasection.c:1.7  Thu Jan 22 16:16:05 2004
+++ php-src/ext/dom/cdatasection.c      Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cdatasection.c,v 1.7 2004/01/22 21:16:05 rrichards Exp $ */
+/* $Id: cdatasection.c,v 1.8 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -36,12 +36,12 @@
 */
 
 zend_function_entry php_dom_cdatasection_class_functions[] = {
-       PHP_FALIAS("domcdatasection", dom_cdatasection_cdatasection, NULL)
+       PHP_ME(domcdatasection, __construct, NULL, ZEND_ACC_PUBLIC)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto domnode dom_cdatasection_cdatasection(string value); */
-PHP_FUNCTION(dom_cdatasection_cdatasection)
+/* {{{ proto void DomCDataSection::__construct(string value); */
+PHP_METHOD(domcdatasection, __construct)
 {
 
        zval *id;
@@ -68,6 +68,6 @@
                php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, 
(void *)intern TSRMLS_CC);
        }
 }
-/* }}} end dom_cdatasection_cdatasection */
+/* }}} end DomCDataSection::__construct */
 
 #endif
http://cvs.php.net/diff.php/php-src/ext/dom/comment.c?r1=1.7&r2=1.8&ty=u
Index: php-src/ext/dom/comment.c
diff -u php-src/ext/dom/comment.c:1.7 php-src/ext/dom/comment.c:1.8
--- php-src/ext/dom/comment.c:1.7       Thu Jan 22 16:16:05 2004
+++ php-src/ext/dom/comment.c   Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: comment.c,v 1.7 2004/01/22 21:16:05 rrichards Exp $ */
+/* $Id: comment.c,v 1.8 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -36,12 +36,12 @@
 */
 
 zend_function_entry php_dom_comment_class_functions[] = {
-       PHP_FALIAS(domcomment, dom_comment_comment, NULL)
+       PHP_ME(domcomment, __construct, NULL, ZEND_ACC_PUBLIC)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto dom_comment_comment([string value]); */
-PHP_FUNCTION(dom_comment_comment)
+/* {{{ proto void DomComment::__construct([string value]); */
+PHP_METHOD(domcomment, __construct)
 {
 
        zval *id;
@@ -68,5 +68,5 @@
                php_libxml_increment_node_ptr((php_libxml_node_object *)intern, 
(xmlNodePtr)nodep, (void *)intern TSRMLS_CC);
        }
 }
-/* }}} end dom_comment_comment */
+/* }}} end DomComment::__construct */
 #endif
http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.50&r2=1.51&ty=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.50 php-src/ext/dom/document.c:1.51
--- php-src/ext/dom/document.c:1.50     Wed Mar  3 15:59:02 2004
+++ php-src/ext/dom/document.c  Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: document.c,v 1.50 2004/03/03 20:59:02 rrichards Exp $ */
+/* $Id: document.c,v 1.51 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -70,7 +70,7 @@
        PHP_FALIAS(save, dom_document_save, NULL)
        PHP_ME(domdocument, loadXML, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
        PHP_FALIAS(saveXML, dom_document_savexml, NULL)
-       PHP_FALIAS(domdocument, dom_document_document, NULL)
+       PHP_ME(domdocument, __construct, NULL, ZEND_ACC_PUBLIC)
        PHP_FALIAS(validate, dom_document_validate, NULL)
        PHP_FALIAS(xinclude, dom_document_xinclude, NULL)
 #if defined(LIBXML_HTML_ENABLED)
@@ -1286,8 +1286,8 @@
 }
 /* }}} end dom_document_rename_node */
 
-/* {{{ proto domnode dom_document_document([string version], [string encoding]); */
-PHP_FUNCTION(dom_document_document)
+/* {{{ proto void DomDocument::__construct([string version], [string encoding]); */
+PHP_METHOD(domdocument, __construct)
 {
 
        zval *id;
http://cvs.php.net/diff.php/php-src/ext/dom/documentfragment.c?r1=1.7&r2=1.8&ty=u
Index: php-src/ext/dom/documentfragment.c
diff -u php-src/ext/dom/documentfragment.c:1.7 php-src/ext/dom/documentfragment.c:1.8
--- php-src/ext/dom/documentfragment.c:1.7      Thu Jan 22 16:16:05 2004
+++ php-src/ext/dom/documentfragment.c  Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: documentfragment.c,v 1.7 2004/01/22 21:16:05 rrichards Exp $ */
+/* $Id: documentfragment.c,v 1.8 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -36,12 +36,12 @@
 */
 
 zend_function_entry php_dom_documentfragment_class_functions[] = {
-       PHP_FALIAS(domdocumentfragment, dom_documentfragment_documentfragment, NULL)
+       PHP_ME(domdocumentfragment, __construct, NULL, ZEND_ACC_PUBLIC)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto dom_documentfragment_documentfragment(); */
-PHP_FUNCTION(dom_documentfragment_documentfragment)
+/* {{{ proto void DomDocumentFragment::__construct(); */
+PHP_METHOD(domdocumentfragment, __construct)
 {
 
        zval *id;
@@ -67,5 +67,5 @@
                php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, 
(void *)intern TSRMLS_CC);
        }
 }
-/* }}} end dom_documentfragment_documentfragment */
+/* }}} end DomDocumentFragment::__construct */
 #endif
http://cvs.php.net/diff.php/php-src/ext/dom/dom_fe.h?r1=1.9&r2=1.10&ty=u
Index: php-src/ext/dom/dom_fe.h
diff -u php-src/ext/dom/dom_fe.h:1.9 php-src/ext/dom/dom_fe.h:1.10
--- php-src/ext/dom/dom_fe.h:1.9        Sun Feb 15 12:07:34 2004
+++ php-src/ext/dom/dom_fe.h    Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: dom_fe.h,v 1.9 2004/02/15 17:07:34 rrichards Exp $ */
+/* $Id: dom_fe.h,v 1.10 2004/03/31 17:18:59 rrichards Exp $ */
 #ifndef DOM_FE_H
 #define DOM_FE_H
 
@@ -99,7 +99,7 @@
 PHP_METHOD(domimplementation, getFeature);
 
 /* domdocumentfragment methods */
-PHP_FUNCTION(dom_documentfragment_documentfragment);
+PHP_METHOD(domdocumentfragment, __construct);
 
 /* domdocument methods */
 PHP_FUNCTION(dom_document_create_element);
@@ -119,7 +119,7 @@
 PHP_FUNCTION(dom_document_adopt_node);
 PHP_FUNCTION(dom_document_normalize_document);
 PHP_FUNCTION(dom_document_rename_node);
-PHP_FUNCTION(dom_document_document);
+PHP_METHOD(domdocument, __construct);
        /* convienience methods */
 PHP_METHOD(domdocument, load);
 PHP_FUNCTION(dom_document_save);
@@ -183,7 +183,7 @@
 
 /* domattr methods */
 PHP_FUNCTION(dom_attr_is_id);
-PHP_FUNCTION(dom_attr_attr);
+PHP_METHOD(domattr, __construct);
 
 /* domelement methods */
 PHP_FUNCTION(dom_element_get_attribute);
@@ -204,16 +204,16 @@
 PHP_FUNCTION(dom_element_set_id_attribute);
 PHP_FUNCTION(dom_element_set_id_attribute_ns);
 PHP_FUNCTION(dom_element_set_id_attribute_node);
-PHP_FUNCTION(dom_element_element);
+PHP_METHOD(domelement, __construct);
 
 /* domtext methods */
 PHP_FUNCTION(dom_text_split_text);
 PHP_FUNCTION(dom_text_is_whitespace_in_element_content);
 PHP_FUNCTION(dom_text_replace_whole_text);
-PHP_FUNCTION(dom_text_text);
+PHP_METHOD(domtext, __construct);
 
 /* domcomment methods */
-PHP_FUNCTION(dom_comment_comment);
+PHP_METHOD(domcomment, __construct);
 
 /* domtypeinfo methods */
 
@@ -233,7 +233,7 @@
 PHP_FUNCTION(dom_domconfiguration_can_set_parameter);
 
 /* domcdatasection methods */
-PHP_FUNCTION(dom_cdatasection_cdatasection);
+PHP_METHOD(domcdatasection, __construct);
 
 /* domdocumenttype methods */
 
@@ -242,10 +242,10 @@
 /* domentity methods */
 
 /* domentityreference methods */
-PHP_FUNCTION(dom_entityreference_entityreference);
+PHP_METHOD(domentityreference, __construct);
 
 /* domprocessinginstruction methods */
-PHP_FUNCTION(dom_processinginstruction_processinginstruction);
+PHP_METHOD(domprocessinginstruction, __construct);
 
 /* string_extend methods */
 PHP_FUNCTION(dom_string_extend_find_offset16);
@@ -253,7 +253,7 @@
 
 #if defined(LIBXML_XPATH_ENABLED)
 /* xpath methods */
-PHP_FUNCTION(dom_xpath_xpath);
+PHP_METHOD(domxpath, __construct);
 PHP_FUNCTION(dom_xpath_register_ns);
 PHP_FUNCTION(dom_xpath_query);
 #endif
http://cvs.php.net/diff.php/php-src/ext/dom/element.c?r1=1.26&r2=1.27&ty=u
Index: php-src/ext/dom/element.c
diff -u php-src/ext/dom/element.c:1.26 php-src/ext/dom/element.c:1.27
--- php-src/ext/dom/element.c:1.26      Sun Feb 22 08:05:49 2004
+++ php-src/ext/dom/element.c   Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: element.c,v 1.26 2004/02/22 13:05:49 rrichards Exp $ */
+/* $Id: element.c,v 1.27 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -54,12 +54,12 @@
        PHP_FALIAS(setIdAttribute, dom_element_set_id_attribute, NULL)
        PHP_FALIAS(setIdAttributeNS, dom_element_set_id_attribute_ns, NULL)
        PHP_FALIAS(setIdAttributeNode, dom_element_set_id_attribute_node, NULL)
-       PHP_FALIAS(domelement, dom_element_element, NULL)
+       PHP_ME(domelement, __construct, NULL, ZEND_ACC_PUBLIC)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto domnode dom_element_element(string name, [string value]); */
-PHP_FUNCTION(dom_element_element)
+/* {{{ proto void DomElement::__construct(string name, [string value]); */
+PHP_METHOD(domelement, __construct)
 {
 
        zval *id;
@@ -121,7 +121,7 @@
                php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, 
(void *)intern TSRMLS_CC);
        }
 }
-/* }}} end dom_element_element */
+/* }}} end DomElement::__construct */
 
 /* {{{ proto tagName   string  
 readonly=yes 
http://cvs.php.net/diff.php/php-src/ext/dom/entityreference.c?r1=1.7&r2=1.8&ty=u
Index: php-src/ext/dom/entityreference.c
diff -u php-src/ext/dom/entityreference.c:1.7 php-src/ext/dom/entityreference.c:1.8
--- php-src/ext/dom/entityreference.c:1.7       Thu Jan 22 16:16:05 2004
+++ php-src/ext/dom/entityreference.c   Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: entityreference.c,v 1.7 2004/01/22 21:16:05 rrichards Exp $ */
+/* $Id: entityreference.c,v 1.8 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -36,12 +36,12 @@
 */
 
 zend_function_entry php_dom_entityreference_class_functions[] = {
-       PHP_FALIAS(domentityreference, dom_entityreference_entityreference, NULL)
+       PHP_ME(domentityreference, __construct, NULL, ZEND_ACC_PUBLIC)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto domnode dom_entityreference_entityreference(string name); */
-PHP_FUNCTION(dom_entityreference_entityreference)
+/* {{{ proto void DomEntityReference::__construct(string name); */
+PHP_METHOD(domentityreference, __construct)
 {
        zval *id;
        xmlNode *node;
@@ -74,5 +74,5 @@
        }
 }
 
-/* }}} end dom_entityreference_entityreference */
+/* }}} end DomEntityReference::__construct */
 #endif
http://cvs.php.net/diff.php/php-src/ext/dom/nodelist.c?r1=1.12&r2=1.13&ty=u
Index: php-src/ext/dom/nodelist.c
diff -u php-src/ext/dom/nodelist.c:1.12 php-src/ext/dom/nodelist.c:1.13
--- php-src/ext/dom/nodelist.c:1.12     Mon Mar 29 14:57:48 2004
+++ php-src/ext/dom/nodelist.c  Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: nodelist.c,v 1.12 2004/03/29 19:57:48 iliaa Exp $ */
+/* $Id: nodelist.c,v 1.13 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -160,6 +160,7 @@
 
                if (itemnode) {
                        DOM_RET_OBJ(rv, itemnode, &ret, objmap->baseobj);
+                       return;
                }
        }
 
http://cvs.php.net/diff.php/php-src/ext/dom/processinginstruction.c?r1=1.11&r2=1.12&ty=u
Index: php-src/ext/dom/processinginstruction.c
diff -u php-src/ext/dom/processinginstruction.c:1.11 
php-src/ext/dom/processinginstruction.c:1.12
--- php-src/ext/dom/processinginstruction.c:1.11        Mon Feb 16 08:06:33 2004
+++ php-src/ext/dom/processinginstruction.c     Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: processinginstruction.c,v 1.11 2004/02/16 13:06:33 rrichards Exp $ */
+/* $Id: processinginstruction.c,v 1.12 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -36,12 +36,12 @@
 */
 
 zend_function_entry php_dom_processinginstruction_class_functions[] = {
-       PHP_FALIAS("domprocessinginstruction", 
dom_processinginstruction_processinginstruction, NULL)
+       PHP_ME(domprocessinginstruction, __construct, NULL, ZEND_ACC_PUBLIC)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto domnode dom_processinginstruction_processinginstruction(string name, 
[string value]); */
-PHP_FUNCTION(dom_processinginstruction_processinginstruction)
+/* {{{ proto void DomProcessingInstruction::__construct(string name, [string value]); 
*/
+PHP_METHOD(domprocessinginstruction, __construct)
 {
 
        zval *id;
@@ -73,7 +73,7 @@
                php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, 
(void *)intern TSRMLS_CC);
        }
 }
-/* }}} end dom_processinginstruction_processinginstruction */
+/* }}} end DomProcessingInstruction::__construct */
 
 /* {{{ proto target    string  
 readonly=yes 
http://cvs.php.net/diff.php/php-src/ext/dom/text.c?r1=1.17&r2=1.18&ty=u
Index: php-src/ext/dom/text.c
diff -u php-src/ext/dom/text.c:1.17 php-src/ext/dom/text.c:1.18
--- php-src/ext/dom/text.c:1.17 Mon Feb 16 08:06:33 2004
+++ php-src/ext/dom/text.c      Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: text.c,v 1.17 2004/02/16 13:06:33 rrichards Exp $ */
+/* $Id: text.c,v 1.18 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -39,12 +39,12 @@
        PHP_FALIAS(splitText, dom_text_split_text, NULL)
        PHP_FALIAS(isWhitespaceInElementContent, 
dom_text_is_whitespace_in_element_content, NULL)
        PHP_FALIAS(replaceWholeText, dom_text_replace_whole_text, NULL)
-       PHP_FALIAS(domtext, dom_text_text, NULL)
+       PHP_ME(domtext, __construct, NULL, ZEND_ACC_PUBLIC)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto domtext_text([string value]); */
-PHP_FUNCTION(dom_text_text)
+/* {{{ proto void DomText::__construct([string value]); */
+PHP_METHOD(domtext, __construct)
 {
 
        zval *id;
@@ -71,7 +71,7 @@
                php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, 
(void *)intern TSRMLS_CC);
        }
 }
-/* }}} end dom_text_text */
+/* }}} end DomText::__construct */
 
 /* {{{ proto wholeText string  
 readonly=yes 
http://cvs.php.net/diff.php/php-src/ext/dom/xpath.c?r1=1.18&r2=1.19&ty=u
Index: php-src/ext/dom/xpath.c
diff -u php-src/ext/dom/xpath.c:1.18 php-src/ext/dom/xpath.c:1.19
--- php-src/ext/dom/xpath.c:1.18        Wed Feb 18 17:42:30 2004
+++ php-src/ext/dom/xpath.c     Wed Mar 31 12:18:59 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: xpath.c,v 1.18 2004/02/18 22:42:30 rrichards Exp $ */
+/* $Id: xpath.c,v 1.19 2004/03/31 17:18:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -35,14 +35,14 @@
 #if defined(LIBXML_XPATH_ENABLED)
 
 zend_function_entry php_dom_xpath_class_functions[] = {
-       PHP_FALIAS(domxpath, dom_xpath_xpath, NULL)
+       PHP_ME(domxpath, __construct, NULL, ZEND_ACC_PUBLIC)
        PHP_FALIAS(register_namespace, dom_xpath_register_ns, NULL)
        PHP_FALIAS(query, dom_xpath_query, NULL)
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto domxpath dom_xpath_xpath(domDocument doc); */
-PHP_FUNCTION(dom_xpath_xpath)
+/* {{{ proto void DomXPath::__construct(domDocument doc); */
+PHP_METHOD(domxpath, __construct)
 {
        zval *id, *doc;
        xmlDocPtr docp = NULL;
@@ -72,7 +72,7 @@
                php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp 
TSRMLS_CC);
        }
 }
-/* }}} end dom_xpath_xpath */
+/* }}} end DomXPath::__construct */
 
 /* {{{ proto domdocument document      document */
 int dom_xpath_document_read(dom_object *obj, zval **retval TSRMLS_DC)

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

Reply via email to