diff options
| author | Rob Richards <rrichards@php.net> | 2003-09-03 10:48:02 +0000 |
|---|---|---|
| committer | Rob Richards <rrichards@php.net> | 2003-09-03 10:48:02 +0000 |
| commit | fd5758781c682fe15bf0ff04da196c442620e26a (patch) | |
| tree | 608824c233591b88a795b58d0a11934f93deb403 /ext | |
| parent | 5630dd0be2293fb707c40339b334dbb8b950bf52 (diff) | |
| download | php-git-fd5758781c682fe15bf0ff04da196c442620e26a.tar.gz | |
changes to php_dom.h for last commit
replaced removed closing tags - doh
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/dom/document.c | 10 | ||||
| -rw-r--r-- | ext/dom/domexception.c | 2 | ||||
| -rw-r--r-- | ext/dom/php_dom.c | 72 | ||||
| -rw-r--r-- | ext/dom/php_dom.h | 5 |
4 files changed, 86 insertions, 3 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c index 933b314949..aa6a4cc240 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -85,6 +85,7 @@ zend_function_entry php_dom_document_class_functions[] = { {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 @@ void add_domdocument_properties(zval *id TSRMLS_DC) { 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 @@ static int dom_document_get_property_int(zval *id, char *property TSRMLS_DC) { return retformat; } +/* }}} end dom_document_get_property_int */ static void php_dom_validate_error(void *ctx, const char *msg, ...) { @@ -133,6 +137,7 @@ static void php_dom_validate_error(void *ctx, const char *msg, ...) 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 @@ static void php_dom_ctx_error(void *ctx, const char *msg, ...) 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 @@ PHP_FUNCTION(dom_document_document) } /* }}} 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 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source TSRMLS_DC) 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 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { 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 diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c index a1be5cbb40..d5257ec1f4 100644 --- a/ext/dom/domexception.c +++ b/ext/dom/domexception.c @@ -41,6 +41,7 @@ zend_function_entry php_dom_domexception_class_functions[] = { {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 @@ void php_dom_throw_error(int error_code, int strict_error TSRMLS_DC) php_error_docref(NULL TSRMLS_CC, E_WARNING, error_message); } } +/* }}} end php_dom_throw_error */ #endif /* HAVE_LIBXML && HAVE_DOM */ diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 9faa45852f..bb8f8c2f54 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -73,6 +73,7 @@ static zend_function_entry dom_functions[] = { {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 @@ int dom_node_is_read_only(xmlNodePtr node) { } } } +/* }}} 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 @@ int dom_node_children_valid(xmlNodePtr node) { return SUCCESS; } } +/* }}} end dom_node_children_valid */ int dom_get_strict_error(dom_ref_obj *document) { if (document) { @@ -118,6 +122,7 @@ int dom_get_strict_error(dom_ref_obj *document) { } } +/* {{{ 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 @@ int increment_document_reference(dom_object *object, xmlDocPtr docp TSRMLS_DC) { 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 @@ int decrement_document_reference(dom_object *object TSRMLS_DC) { 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 @@ int decrement_node_ptr(dom_object *object TSRMLS_DC) { 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 @@ xmlNodePtr dom_object_get_node(dom_object *obj) 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 @@ static void dom_object_set_data(xmlNodePtr obj, dom_object *wrapper TSRMLS_DC) 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 @@ dom_object *dom_object_get_data(xmlNodePtr obj) 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 @@ static void php_dom_clear_object(dom_object *object TSRMLS_DC) 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 @@ void php_dom_set_object(dom_object *object, xmlNodePtr obj TSRMLS_DC) } } } +/* }}} end php_dom_set_object */ +/* {{{ dom_unregister_node */ void dom_unregister_node(xmlNodePtr nodep TSRMLS_DC) { dom_object *wrapper; @@ -239,20 +260,26 @@ void dom_unregister_node(xmlNodePtr nodep TSRMLS_DC) 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 @@ static void dom_register_prop_handler(HashTable *prop_handler, char *name, dom_r 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 @@ zval *dom_read_property(zval *object, zval *member, zend_bool silent TSRMLS_DC) } return retval; } +/* }}} */ +/* {{{ dom_write_property */ void dom_write_property(zval *object, zval *member, zval *value TSRMLS_DC) { dom_object *obj; @@ -339,6 +370,7 @@ void dom_write_property(zval *object, zval *member, zval *value TSRMLS_DC) zval_dtor(member); } } +/* }}} */ zend_module_entry dom_module_entry = { STANDARD_MODULE_HEADER, @@ -634,6 +666,7 @@ PHP_MINIT_FUNCTION(dom) } /* }}} */ +/* {{{ */ PHP_MINFO_FUNCTION(dom) { php_info_print_table_start(); @@ -651,6 +684,7 @@ PHP_MINFO_FUNCTION(dom) #endif php_info_print_table_end(); } +/* }}} */ PHP_MSHUTDOWN_FUNCTION(dom) { @@ -687,6 +721,7 @@ PHP_MSHUTDOWN_FUNCTION(dom) return SUCCESS; } +/* {{{ node_list_unlink */ void node_list_unlink(xmlNodePtr node TSRMLS_DC) { dom_object *wrapper; @@ -716,7 +751,10 @@ void node_list_unlink(xmlNodePtr node TSRMLS_DC) 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 @@ void dom_node_free(xmlNodePtr node) } } } +/* }}} end dom_node_free */ +/* {{{ node_free_list */ void node_free_list(xmlNodePtr node TSRMLS_DC) { xmlNodePtr curnode; @@ -786,7 +826,9 @@ void node_free_list(xmlNodePtr node TSRMLS_DC) } } } +/* }}} end node_free_list */ +/* {{{ node_free_resource */ void node_free_resource(xmlNodePtr node TSRMLS_DC) { if (!node) { @@ -818,13 +860,17 @@ void node_free_resource(xmlNodePtr node TSRMLS_DC) } } } +/* }}} */ +/* {{{ 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 @@ void dom_xpath_objects_dtor(void *object, zend_object_handle handle TSRMLS_DC) 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 @@ void dom_objects_dtor(void *object, zend_object_handle handle TSRMLS_DC) 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 @@ static dom_object* dom_objects_set_class(zend_class_entry *class_type TSRMLS_DC) 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 @@ zend_object_value dom_objects_new(zend_class_entry *class_type TSRMLS_DC) /* }}} */ #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 @@ zend_object_value dom_xpath_objects_new(zend_class_entry *class_type TSRMLS_DC) 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 @@ zval *php_dom_create_object(xmlNodePtr obj, int *found, zval *wrapper_in, zval * 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 @@ int dom_hierarchy(xmlNodePtr parent, xmlNodePtr child) 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 @@ int dom_has_feature(char *feature, char *version) 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 @@ void dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *local 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 @@ void dom_normalize (xmlNodePtr nodep TSRMLS_DC) 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 @@ void dom_set_old_ns(xmlDoc *doc, xmlNs *ns) { } 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 @@ int dom_check_qname(char *qname, char **localname, char **prefix, int uri_len, i 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 @@ xmlNsPtr dom_get_ns(xmlNodePtr nodep, char *uri, int *errorcode, char *prefix) { 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 @@ xmlNsPtr dom_get_nsdecl(xmlNode *node, xmlChar *localName) { } return ret; } +/* }}} end dom_get_nsdecl */ #endif /* HAVE_DOM */ diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index c162de4e3c..6946b87ef8 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -47,7 +47,6 @@ extern zend_module_entry dom_module_entry; #if defined(LIBXML_XPTR_ENABLED) #include <libxml/xpointer.h> #endif - #ifdef PHP_WIN32 #ifndef DOM_EXPORTS #define DOM_EXPORTS @@ -55,12 +54,12 @@ extern zend_module_entry dom_module_entry; #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" |
