summaryrefslogtreecommitdiff
path: root/ext/dom/xpath.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2014-10-16 21:28:40 -0700
committerRasmus Lerdorf <rasmus@php.net>2014-10-16 21:28:40 -0700
commita9d6556971a435f71eabf142d8fb814382f3b6ac (patch)
tree4fecce88bbc1bc3259856eb0314d780184de85eb /ext/dom/xpath.c
parent86674b5837bffe4486714f9661620020ee498f3b (diff)
parent176b8d7ca3aef3a172d8e429627c98e0328d02d8 (diff)
downloadphp-git-a9d6556971a435f71eabf142d8fb814382f3b6ac.tar.gz
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (1132 commits) Micro optimizations for isset/empty Micro optimization for zend_hash_next_index_insert_new() Fix array_keys() on $GLOBALS Fix procedural finfo calls in methods Fix allocator for 64bit zend_long with 32bit long Use intptr_t for zend_intptr_t typedef Fix format strings in zend_alloc Drop zend_long64 in favor of int64_t Removed deprecated fields NEWS cleanup NEWS removing the NEWS entry as we had to revert this fix for now Revert "Merge branch 'PHP-5.5' into PHP-5.6" Revert "fix TS build" Revert "Merge branch 'PHP-5.4' into PHP-5.5" Revert "Bug #67965: Fix blocking behavior in non-blocking crypto streams" Revert "Bug #41631: Fix regression from first attempt (6569db8)" NEWS Fixed Bug #65171 imagescale() fails Fixed bug #68234 ...
Diffstat (limited to 'ext/dom/xpath.c')
-rw-r--r--ext/dom/xpath.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c
index 8351946038..336365e342 100644
--- a/ext/dom/xpath.c
+++ b/ext/dom/xpath.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
@@ -186,7 +186,7 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
}
return;
}
- ZVAL_STRING(&fci.function_name, obj->stringval);
+ ZVAL_STRING(&fci.function_name, (char *) obj->stringval);
xmlXPathFreeObject(obj);
fci.symbol_table = NULL;
@@ -222,13 +222,13 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
valuePush(ctxt, xmlXPathNewString((xmlChar *)""));
} else {
zend_string *str = zval_get_string(&retval);
- valuePush(ctxt, xmlXPathNewString(str->val));
- STR_RELEASE(str);
+ valuePush(ctxt, xmlXPathNewString((xmlChar *) str->val));
+ zend_string_release(str);
}
zval_ptr_dtor(&retval);
}
}
- STR_RELEASE(callable);
+ zend_string_release(callable);
zval_dtor(&fci.function_name);
if (fci.param_count > 0) {
for (i = 0; i < nargs - 1; i++) {
@@ -319,7 +319,7 @@ PHP_FUNCTION(dom_xpath_register_ns)
{
zval *id;
xmlXPathContextPtr ctxp;
- int prefix_len, ns_uri_len;
+ size_t prefix_len, ns_uri_len;
dom_xpath_object *intern;
unsigned char *prefix, *ns_uri;
@@ -357,7 +357,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
xmlXPathContextPtr ctxp;
xmlNodePtr nodep = NULL;
xmlXPathObjectPtr xpathobjp;
- int expr_len, nsnbr = 0, xpath_type;
+ size_t expr_len, nsnbr = 0, xpath_type;
dom_xpath_object *intern;
dom_object *nodeobj;
char *expr;
@@ -412,7 +412,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
ctxp->namespaces = ns;
ctxp->nsNr = nsnbr;
- xpathobjp = xmlXPathEvalExpression(expr, ctxp);
+ xpathobjp = xmlXPathEvalExpression((xmlChar *) expr, ctxp);
ctxp->node = NULL;
if (ns != NULL) {
@@ -453,12 +453,12 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
nsparent = node->_private;
curns = xmlNewNs(NULL, node->name, NULL);
if (node->children) {
- curns->prefix = xmlStrdup((char *) node->children);
+ curns->prefix = xmlStrdup((xmlChar *) node->children);
}
if (node->children) {
- node = xmlNewDocNode(docp, NULL, (char *) node->children, node->name);
+ node = xmlNewDocNode(docp, NULL, (xmlChar *) node->children, node->name);
} else {
- node = xmlNewDocNode(docp, NULL, "xmlns", node->name);
+ node = xmlNewDocNode(docp, NULL, (xmlChar *) "xmlns", node->name);
}
node->type = XML_NAMESPACE_DECL;
node->parent = nsparent;
@@ -483,7 +483,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
break;
case XPATH_STRING:
- RETVAL_STRING(xpathobjp->stringval);
+ RETVAL_STRING((char *) xpathobjp->stringval);
break;
default:
@@ -524,10 +524,10 @@ PHP_FUNCTION(dom_xpath_register_php_functions)
zend_hash_internal_pointer_reset(Z_ARRVAL_P(array_value));
while ((entry = zend_hash_get_current_data(Z_ARRVAL_P(array_value)))) {
zend_string *str = zval_get_string(entry);
- ZVAL_INT(&new_string,1);
+ ZVAL_LONG(&new_string,1);
zend_hash_update(intern->registered_phpfunctions, str, &new_string);
zend_hash_move_forward(Z_ARRVAL_P(array_value));
- STR_RELEASE(str);
+ zend_string_release(str);
}
intern->registerPhpFunctions = 2;
RETURN_TRUE;
@@ -535,7 +535,7 @@ PHP_FUNCTION(dom_xpath_register_php_functions)
} else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "S", &name) == SUCCESS) {
intern = Z_XPATHOBJ_P(id);
- ZVAL_INT(&new_string, 1);
+ ZVAL_LONG(&new_string, 1);
zend_hash_update(intern->registered_phpfunctions, name, &new_string);
intern->registerPhpFunctions = 2;
} else {