rrichards               Wed Sep  3 06:48:02 2003 EDT

  Modified files:              
    /php-src/ext/dom    php_dom.h php_dom.c domexception.c document.c 
  Log:
  changes to php_dom.h for last commit
  replaced removed closing tags - doh
  
Index: php-src/ext/dom/php_dom.h
diff -u php-src/ext/dom/php_dom.h:1.14 php-src/ext/dom/php_dom.h:1.15
--- php-src/ext/dom/php_dom.h:1.14      Sun Aug 24 06:24:22 2003
+++ php-src/ext/dom/php_dom.h   Wed Sep  3 06:48:02 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_dom.h,v 1.14 2003/08/24 10:24:22 rrichards Exp $ */
+/* $Id: php_dom.h,v 1.15 2003/09/03 10:48:02 rrichards Exp $ */
 
 #ifndef PHP_DOM_H
 #define PHP_DOM_H
@@ -47,7 +47,6 @@
 #if defined(LIBXML_XPTR_ENABLED)
 #include <libxml/xpointer.h>
 #endif
-
 #ifdef PHP_WIN32
 #ifndef DOM_EXPORTS
 #define DOM_EXPORTS
@@ -55,12 +54,12 @@
 #endif
 
 #include "xml_common.h"
-
+#include "zend_default_classes.h"
 /* DOM API_VERSION, please bump it up, if you change anything in the API
     therefore it's easier for the script-programmers to check, what's working how
    Can be checked with phpversion("dom");
 */
-#define DOM_API_VERSION "20030413"
+#define DOM_API_VERSION "20030901"
 
 #include "dom_fe.h"
 
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.29 php-src/ext/dom/php_dom.c:1.30
--- php-src/ext/dom/php_dom.c:1.29      Wed Sep  3 06:11:53 2003
+++ php-src/ext/dom/php_dom.c   Wed Sep  3 06:48:02 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_dom.c,v 1.29 2003/09/03 10:11:53 rrichards Exp $ */
+/* $Id: php_dom.c,v 1.30 2003/09/03 10:48:02 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -73,6 +73,7 @@
        {NULL, NULL, NULL}
 };
 
+/* {{{ int dom_node_is_read_only(xmlNodePtr node) */
 int dom_node_is_read_only(xmlNodePtr node) {
        switch (node->type) {
                case XML_ENTITY_REF_NODE:
@@ -94,7 +95,9 @@
                        }
        }
 }
+/* }}} end dom_node_is_read_only */
 
+/* {{{ int dom_node_children_valid(xmlNodePtr node) */
 int dom_node_children_valid(xmlNodePtr node) {
        switch (node->type) {
                case XML_DOCUMENT_TYPE_NODE:
@@ -109,6 +112,7 @@
                        return SUCCESS;
        }
 }
+/* }}} end dom_node_children_valid */
 
 int dom_get_strict_error(dom_ref_obj *document) {
        if (document) {
@@ -118,6 +122,7 @@
        }
 }
 
+/* {{{ int increment_document_reference(dom_object *object) */
 int increment_document_reference(dom_object *object, xmlDocPtr docp TSRMLS_DC) {
        int ret_refcount = -1;
 
@@ -134,7 +139,9 @@
 
        return ret_refcount;
 }
+/* }}} end increment_document_reference */
 
+/* {{{ int decrement_document_reference(dom_object *object) */
 int decrement_document_reference(dom_object *object TSRMLS_DC) {
        int ret_refcount = -1;
 
@@ -153,7 +160,9 @@
 
        return ret_refcount;
 }
+/* }}} end decrement_document_reference */
 
+/* {{{ int decrement_node_ptr(dom_object *object) */
 int decrement_node_ptr(dom_object *object TSRMLS_DC) {
        int ret_refcount = -1;
        node_ptr *obj_node;
@@ -172,7 +181,9 @@
 
        return ret_refcount;
 }
+/* }}} end decrement_node_ptr */
 
+/* {{{ xmlNodePtr dom_object_get_node(dom_object *obj) */
 xmlNodePtr dom_object_get_node(dom_object *obj)
 {
        if (obj->ptr != NULL) {
@@ -181,7 +192,9 @@
                return NULL;
        }
 }
+/* }}} end dom_object_get_node */
 
+/* {{{ dom_object_set_data */
 static void dom_object_set_data(xmlNodePtr obj, dom_object *wrapper TSRMLS_DC)
 {
        if (wrapper == NULL) {
@@ -190,7 +203,9 @@
                obj->_private = wrapper->ptr;
        }
 }
+/* }}} end dom_object_set_data */
 
+/* {{{ dom_object *dom_object_get_data(xmlNodePtr obj) */
 dom_object *dom_object_get_data(xmlNodePtr obj)
 {
        if (obj->_private != NULL) {
@@ -199,7 +214,9 @@
                return NULL;
        }
 }
+/* }}} end dom_object_get_data */
 
+/* {{{ php_dom_clear_object */
 static void php_dom_clear_object(dom_object *object TSRMLS_DC)
 {
        if (object->prop_handler) {
@@ -208,7 +225,9 @@
        decrement_node_ptr(object TSRMLS_CC);
        decrement_document_reference(object TSRMLS_CC);
 }
+/* }}} end php_dom_clear_object */
 
+/* {{{ void php_dom_set_object(dom_object *object, xmlNodePtr obj TSRMLS_DC) */
 void php_dom_set_object(dom_object *object, xmlNodePtr obj TSRMLS_DC)
 {
        node_ptr *obj_node;
@@ -229,7 +248,9 @@
                }
        }
 }
+/* }}} end php_dom_set_object */
 
+/* {{{ dom_unregister_node */
 void dom_unregister_node(xmlNodePtr nodep TSRMLS_DC)
 {
        dom_object *wrapper;
@@ -239,20 +260,26 @@
                php_dom_clear_object(wrapper TSRMLS_CC);
        }
 }
+/* }}} end dom_unregister_node */
 
+/* {{{ dom_read_na */
 static int dom_read_na(dom_object *obj, zval **retval TSRMLS_DC)
 {
        *retval = NULL;
        php_error_docref(NULL TSRMLS_CC, E_ERROR, "Cannot read property");
        return FAILURE;
 }
+/* }}} */
 
+/* {{{ dom_write_na */
 static int dom_write_na(dom_object *obj, zval *newval TSRMLS_DC)
 {
        php_error_docref(NULL TSRMLS_CC, E_ERROR, "Cannot write property");
        return FAILURE;
 }
+/* }}} */
 
+/* {{{ dom_register_prop_handler */
 static void dom_register_prop_handler(HashTable *prop_handler, char *name, dom_read_t 
read_func, dom_write_t write_func TSRMLS_DC)
 {
        dom_prop_handler hnd;
@@ -261,7 +288,9 @@
        hnd.write_func = write_func ? write_func : dom_write_na;
        zend_hash_add(prop_handler, name, strlen(name)+1, &hnd, 
sizeof(dom_prop_handler), NULL);
 }
+/* }}} */
 
+/* {{{ dom_read_property */
 zval *dom_read_property(zval *object, zval *member, zend_bool silent TSRMLS_DC)
 {
        dom_object *obj;
@@ -302,7 +331,9 @@
        }
        return retval;
 }
+/* }}} */
 
+/* {{{ dom_write_property */
 void dom_write_property(zval *object, zval *member, zval *value TSRMLS_DC)
 {
        dom_object *obj;
@@ -339,6 +370,7 @@
                zval_dtor(member);
        }
 }
+/* }}} */
 
 zend_module_entry dom_module_entry = {
        STANDARD_MODULE_HEADER,
@@ -634,6 +666,7 @@
 }
 /* }}} */
 
+/* {{{ */
 PHP_MINFO_FUNCTION(dom)
 {
        php_info_print_table_start();
@@ -651,6 +684,7 @@
 #endif
        php_info_print_table_end();
 }
+/* }}} */
 
 PHP_MSHUTDOWN_FUNCTION(dom)
 {
@@ -687,6 +721,7 @@
        return SUCCESS;
 }
 
+/* {{{ node_list_unlink */
 void node_list_unlink(xmlNodePtr node TSRMLS_DC)
 {
        dom_object *wrapper;
@@ -716,7 +751,10 @@
                node = node->next;
        }
 }
+/* }}} end node_list_unlink */
 
+
+/* {{{ void dom_node_free(xmlNodePtr node) */
 void dom_node_free(xmlNodePtr node)
 {
        if(node) {
@@ -751,7 +789,9 @@
                }
        }
 }
+/* }}} end dom_node_free */
 
+/* {{{ node_free_list */
 void node_free_list(xmlNodePtr node TSRMLS_DC)
 {
        xmlNodePtr curnode;
@@ -786,7 +826,9 @@
                }
        }
 }
+/* }}} end node_free_list */
 
+/* {{{ node_free_resource */
 void node_free_resource(xmlNodePtr node TSRMLS_DC)
 {
        if (!node) {
@@ -818,13 +860,17 @@
                        }
        }
 }
+/* }}} */
 
+/* {{{ dom_objects_clone */
 void dom_objects_clone(void *object, void **object_clone TSRMLS_DC)
 {
        /* TODO */
 }
+/* }}} */
 
 #if defined(LIBXML_XPATH_ENABLED)
+/* {{{ dom_xpath_objects_dtor */
 void dom_xpath_objects_dtor(void *object, zend_object_handle handle TSRMLS_DC)
 {
        dom_object *intern = (dom_object *)object;
@@ -840,8 +886,10 @@
 
        efree(object);
 }
+/* }}} */
 #endif
 
+/* {{{ dom_objects_dtor */
 void dom_objects_dtor(void *object, zend_object_handle handle TSRMLS_DC)
 {
        dom_object *intern = (dom_object *)object;
@@ -862,7 +910,9 @@
 
        efree(object);
 }
+/* }}} */
 
+/* {{{ dom_objects_set_class */
 static dom_object* dom_objects_set_class(zend_class_entry *class_type TSRMLS_DC)
 {
        zend_class_entry *base_class;
@@ -890,7 +940,9 @@
 
        return intern;
 }
+/* }}} */
 
+/* {{{ dom_objects_new */
 zend_object_value dom_objects_new(zend_class_entry *class_type TSRMLS_DC)
 {
        zend_object_value retval;
@@ -907,6 +959,7 @@
 /* }}} */
 
 #if defined(LIBXML_XPATH_ENABLED)
+/* {{{ zend_object_value dom_xpath_objects_new(zend_class_entry *class_type 
TSRMLS_DC) */
 zend_object_value dom_xpath_objects_new(zend_class_entry *class_type TSRMLS_DC)
 {
        zend_object_value retval;
@@ -920,8 +973,10 @@
 
        return retval;
 }
+/* }}} */
 #endif
 
+/* {{{ php_dom_create_object */
 zval *php_dom_create_object(xmlNodePtr obj, int *found, zval *wrapper_in, zval 
*return_value, dom_object *domobj TSRMLS_DC)
 {
        zval *wrapper;
@@ -1034,12 +1089,14 @@
        php_dom_set_object(intern, (void *) obj TSRMLS_CC);
        return (wrapper);
 }
+/* }}} end php_domobject_new */
 
 
 void php_dom_create_implementation(zval **retval  TSRMLS_DC) {
        object_init_ex(*retval, dom_domimplementation_class_entry);
 }
 
+/* {{{ int dom_hierarchy(xmlNodePtr parent, xmlNodePtr child) */
 int dom_hierarchy(xmlNodePtr parent, xmlNodePtr child) 
 {
        xmlNodePtr nodep;
@@ -1059,7 +1116,9 @@
 
     return SUCCESS;
 }
+/* }}} end dom_hierarchy */
 
+/* {{{ dom_has_feature(char *feature, char *version) */
 int dom_has_feature(char *feature, char *version)
 {
        int retval = 0;
@@ -1071,7 +1130,9 @@
 
        return retval;
 }
+/* }}} end dom_has_feature */
 
+/* {{{ void dom_element_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, 
char *local, zval **retval  TSRMLS_DC) */
 void dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *local, 
zval **retval, dom_object *intern  TSRMLS_DC)
 {
        dom_object *wrapper;
@@ -1094,7 +1155,10 @@
                nodep = nodep->next;
        }
 }
+/* }}} end dom_element_get_elements_by_tag_name_ns_raw */
+
 
+/* {{{ void dom_normalize (xmlNodePtr nodep TSRMLS_DC) */
 void dom_normalize (xmlNodePtr nodep TSRMLS_DC)
 {
        xmlNodePtr child, nextp, newnextp;
@@ -1137,7 +1201,10 @@
                child = child->next;
        }
 }
+/* }}} end dom_normalize */
+
 
+/* {{{ void dom_set_old_ns(xmlDoc *doc, xmlNs *ns) */
 void dom_set_old_ns(xmlDoc *doc, xmlNs *ns) {
        xmlNs *cur;
 
@@ -1161,6 +1228,7 @@
        }
        cur->next = ns;
 }
+/* }}} end dom_set_old_ns */
 
 int dom_check_qname(char *qname, char **localname, char **prefix, int uri_len, int 
name_len) {
        int errorcode = 0;
@@ -1180,6 +1248,7 @@
        return errorcode;
 }
 
+/* {{{ xmlNsPtr dom_get_ns(xmlNodePtr nodep, char *uri, int *errorcode, char *prefix) 
*/
 xmlNsPtr dom_get_ns(xmlNodePtr nodep, char *uri, int *errorcode, char *prefix) {
        xmlNsPtr nsptr = NULL;
 
@@ -1196,7 +1265,9 @@
        return nsptr;
 
 }
+/* }}} end dom_get_ns */
 
+/* {{{ xmlNsPtr dom_get_nsdecl(xmlNode *node, xmlChar *localName) */
 xmlNsPtr dom_get_nsdecl(xmlNode *node, xmlChar *localName) {
        xmlNsPtr cur;
        xmlNs *ret = NULL;
@@ -1224,6 +1295,7 @@
        }
        return ret;
 }
+/* }}} end dom_get_nsdecl */
 
 #endif /* HAVE_DOM */
 
Index: php-src/ext/dom/domexception.c
diff -u php-src/ext/dom/domexception.c:1.5 php-src/ext/dom/domexception.c:1.6
--- php-src/ext/dom/domexception.c:1.5  Wed Sep  3 06:11:53 2003
+++ php-src/ext/dom/domexception.c      Wed Sep  3 06:48:02 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: domexception.c,v 1.5 2003/09/03 10:11:53 rrichards Exp $ */
+/* $Id: domexception.c,v 1.6 2003/09/03 10:48:02 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -41,6 +41,7 @@
        {NULL, NULL, NULL}
 };
 
+/* {{{ php_dom_throw_error */
 void php_dom_throw_error(int error_code, int strict_error TSRMLS_DC)
 {
        char *error_message;
@@ -105,5 +106,6 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, error_message);
        }
 }
+/* }}} end php_dom_throw_error */
 
 #endif /* HAVE_LIBXML && HAVE_DOM */
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.22 php-src/ext/dom/document.c:1.23
--- php-src/ext/dom/document.c:1.22     Wed Sep  3 06:11:53 2003
+++ php-src/ext/dom/document.c  Wed Sep  3 06:48:02 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: document.c,v 1.22 2003/09/03 10:11:53 rrichards Exp $ */
+/* $Id: document.c,v 1.23 2003/09/03 10:48:02 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -85,6 +85,7 @@
        {NULL, NULL, NULL}
 };
 
+/* {{{ void add_domdocument_properties(zval *id) */
 void add_domdocument_properties(zval *id TSRMLS_DC) {
        add_property_bool(id, "formatOutput", 0);
        add_property_bool(id, "validateOnParse", 0);
@@ -92,7 +93,9 @@
        add_property_bool(id, "preserveWhiteSpace", 1);
        add_property_bool(id, "substituteEntities", 0);
 }
+/* }}} end add_domdocument_properties */
 
+/* {{{ static int dom_document_get_property_int(zval *id, char *property TSRMLS_DC) */
 static int dom_document_get_property_int(zval *id, char *property TSRMLS_DC) {
        zval *format, *member;
        zend_object_handlers *std_hnd;
@@ -113,6 +116,7 @@
 
        return retformat;
 }
+/* }}} end dom_document_get_property_int */
 
 static void php_dom_validate_error(void *ctx, const char *msg, ...)
 {
@@ -133,6 +137,7 @@
        efree(buf);
 }
 
+/* {{{ static void php_dom_ctx_error(void *ctx, const char *msg, ...) */
 static void php_dom_ctx_error(void *ctx, const char *msg, ...)
 {
        va_list ap;
@@ -154,6 +159,7 @@
        php_error(E_WARNING, "%s in %s, line: %d", buf, parser->input->filename, 
parser->input->line);
        efree(buf);
 }
+/* }}} end php_dom_ctx_error */
 
 /* {{{ proto doctype   documenttype    
 readonly=yes 
@@ -1077,6 +1083,7 @@
 }
 /* }}} end dom_document_document */
 
+/* {{{ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source 
TSRMLS_DC) */
 static xmlDocPtr dom_document_parser(zval *id, int mode, char *source TSRMLS_DC) {
     xmlDocPtr ret;
     xmlParserCtxtPtr ctxt;
@@ -1140,7 +1147,9 @@
 
        return(ret);
 }
+/* }}} end dom_parser_document */
 
+/* {{{ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) */
 static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) {
        zval *id, *rv = NULL;
        xmlDoc *docp = NULL, *newdoc;
@@ -1187,6 +1196,7 @@
                DOM_RET_OBJ(rv, (xmlNodePtr) newdoc, &ret, NULL);
        }
 }
+/* }}} end dom_parser_document */
 
 /* {{{ proto boolean domnode dom_document_load(string source);
 URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-load

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

Reply via email to