]> granicus.if.org Git - php/commitdiff
ported ext/dom
authorAnatol Belski <ab@php.net>
Tue, 19 Aug 2014 19:22:07 +0000 (21:22 +0200)
committerAnatol Belski <ab@php.net>
Tue, 19 Aug 2014 19:22:07 +0000 (21:22 +0200)
ext/dom/characterdata.c
ext/dom/document.c
ext/dom/namednodemap.c
ext/dom/php_dom.c
ext/dom/text.c

index f3966df6a7011664bf1127272d8eddffd95b5323..390e4e032b5dba1c8d4a79ce9c7bc0e9d46e171d 100644 (file)
@@ -156,11 +156,11 @@ PHP_FUNCTION(dom_characterdata_substring_data)
        xmlChar    *cur;
        xmlChar    *substring;
        xmlNodePtr  node;
-       long        offset, count;
+       php_int_t        offset, count;
        int         length;
        dom_object      *intern;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, dom_characterdata_class_entry, &offset, &count) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oii", &id, dom_characterdata_class_entry, &offset, &count) == FAILURE) {
                return;
        }
 
@@ -239,11 +239,11 @@ PHP_FUNCTION(dom_characterdata_insert_data)
        xmlChar         *cur, *first, *second;
        xmlNodePtr  node;
        char            *arg;
-       long        offset;
+       php_int_t        offset;
        int         length, arg_len;
        dom_object      *intern;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols", &id, dom_characterdata_class_entry, &offset, &arg, &arg_len) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ois", &id, dom_characterdata_class_entry, &offset, &arg, &arg_len) == FAILURE) {
                return;
        }
 
@@ -286,11 +286,11 @@ PHP_FUNCTION(dom_characterdata_delete_data)
        zval *id;
        xmlChar    *cur, *substring, *second;
        xmlNodePtr  node;
-       long        offset, count;
+       php_int_t        offset, count;
        int         length;
        dom_object      *intern;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, dom_characterdata_class_entry, &offset, &count) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oii", &id, dom_characterdata_class_entry, &offset, &count) == FAILURE) {
                return;
        }
 
@@ -342,11 +342,11 @@ PHP_FUNCTION(dom_characterdata_replace_data)
        xmlChar         *cur, *substring, *second = NULL;
        xmlNodePtr  node;
        char            *arg;
-       long        offset, count;
+       php_int_t        offset, count;
        int         length, arg_len;
        dom_object      *intern;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Olls", &id, dom_characterdata_class_entry, &offset, &count, &arg, &arg_len) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oiis", &id, dom_characterdata_class_entry, &offset, &count, &arg, &arg_len) == FAILURE) {
                return;
        }
 
index 86373fe388e348b32aec6ac77ed97aecfca540c5..abe0c55f0643a78b8c2037368f8920ee1c52fc85 100644 (file)
@@ -970,9 +970,9 @@ PHP_FUNCTION(dom_document_import_node)
        xmlNodePtr nodep, retnodep;
        dom_object *intern, *nodeobj;
        int ret; 
-       long recursive = 0;
+       php_int_t recursive = 0;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|i", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) {
                return;
        }
 
@@ -1465,14 +1465,14 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) {
        dom_object *intern;
        char *source;
        int source_len, refcount, ret;
-       long options = 0;
+       php_int_t options = 0;
 
        id = getThis();
        if (id != NULL && ! instanceof_function(Z_OBJCE_P(id), dom_document_class_entry TSRMLS_CC)) {
                id = NULL;
        }
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &options) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|i", &source, &source_len, &options) == FAILURE) {
                return;
        }
 
@@ -1547,9 +1547,9 @@ PHP_FUNCTION(dom_document_save)
        dom_object *intern;
        dom_doc_propsptr doc_props;
        char *file;
-       long options = 0;
+       php_int_t options = 0;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &id, dom_document_class_entry, &file, &file_len, &options) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|i", &id, dom_document_class_entry, &file, &file_len, &options) == FAILURE) {
                return;
        }
 
@@ -1593,9 +1593,9 @@ PHP_FUNCTION(dom_document_savexml)
        dom_object *intern, *nodeobj;
        dom_doc_propsptr doc_props;
        int size, format, saveempty = 0;
-       long options = 0;
+       php_int_t options = 0;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O!l", &id, dom_document_class_entry, &nodep, dom_node_class_entry, &options) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O!i", &id, dom_document_class_entry, &nodep, dom_node_class_entry, &options) == FAILURE) {
                return;
        }
 
@@ -1698,11 +1698,11 @@ PHP_FUNCTION(dom_document_xinclude)
        zval *id;
        xmlDoc *docp;
        xmlNodePtr root;
-       long flags = 0; 
+       php_int_t flags = 0; 
        int err;
        dom_object *intern;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, dom_document_class_entry, &flags) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|i", &id, dom_document_class_entry, &flags) == FAILURE) {
                return;
        }
 
@@ -1772,14 +1772,14 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
        dom_object *intern;
        char *source = NULL, *valid_file = NULL;
        int source_len = 0, valid_opts = 0;
-       long flags = 0;
+       php_int_t flags = 0;
        xmlSchemaParserCtxtPtr  parser;
        xmlSchemaPtr            sptr;
        xmlSchemaValidCtxtPtr   vptr;
        int                     is_valid;
        char resolved_path[MAXPATHLEN + 1];
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op|l", &id, dom_document_class_entry, &source, &source_len, &flags) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op|i", &id, dom_document_class_entry, &source, &source_len, &flags) == FAILURE) {
                return;
        }
 
@@ -1963,12 +1963,12 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
        dom_doc_propsptr doc_prop;
        char *source;
        int source_len, refcount, ret;
-       long options = 0;
+       php_int_t options = 0;
        htmlParserCtxtPtr ctxt;
        
        id = getThis();
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &options) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|i", &source, &source_len, &options) == FAILURE) {
                return;
        }
 
index 91ae6a1282b47293f8b48c3c26a4a62c75c46d1b..43c26605bc9e924ae96924cf73813bd004139fe1 100644 (file)
@@ -200,7 +200,7 @@ Since:
 PHP_FUNCTION(dom_namednodemap_item)
 {
        zval *id;
-       long index;
+       php_int_t index;
        int ret;
        dom_object *intern;
        xmlNodePtr itemnode = NULL;
@@ -209,7 +209,7 @@ PHP_FUNCTION(dom_namednodemap_item)
        xmlNodePtr nodep, curnode;
        int count;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_namednodemap_class_entry, &index) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oi", &id, dom_namednodemap_class_entry, &index) == FAILURE) {
                return;
        }
        if (index >= 0) {
index f328ba77087367339eb6ac30734bd89b87a7b85d..49ac4740a93444d82e6d7a5ed2b1e964e6abd265 100644 (file)
@@ -440,7 +440,7 @@ static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp TSRMLS_DC
                        zend_hash_move_forward_ex(prop_handlers, &pos)) {
                zval value;
                zend_string *string_key;
-               ulong num_key;
+               php_uint_t num_key;
 
                if (entry->read_func(obj, &value TSRMLS_CC) == FAILURE) {
                        continue;
index cccc44b311739d838e0b32a3d76a6e2ac9842f13..66bdcec0e44f1ea5ca6fcb179450efb018685081 100644 (file)
@@ -149,11 +149,11 @@ PHP_FUNCTION(dom_text_split_text)
        xmlChar    *second;
        xmlNodePtr  node;
        xmlNodePtr  nnode;
-       long        offset;
+       php_int_t        offset;
        int         length;
        dom_object      *intern;
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_text_class_entry, &offset) == FAILURE) {
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oi", &id, dom_text_class_entry, &offset) == FAILURE) {
                return;
        }
        DOM_GET_OBJ(node, id, xmlNodePtr, intern);