summaryrefslogtreecommitdiff
path: root/ext/dom/text.c
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2004-02-15 10:54:37 +0000
committerRob Richards <rrichards@php.net>2004-02-15 10:54:37 +0000
commita2e1844de9d2584769fbd4a06e7b67e418919198 (patch)
treee45fd090071c7df7cd445694b8db039929fdee21 /ext/dom/text.c
parent104f2b5ff4940727b06346979750f0cb387d4c7e (diff)
downloadphp-git-a2e1844de9d2584769fbd4a06e7b67e418919198.tar.gz
start of dom update
switch to zend_parse_method_parameters for consistancy insure object parameters are correct class types convert zvals to correct type if needed for property writes
Diffstat (limited to 'ext/dom/text.c')
-rw-r--r--ext/dom/text.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/dom/text.c b/ext/dom/text.c
index d315adaff8..05fca65ded 100644
--- a/ext/dom/text.c
+++ b/ext/dom/text.c
@@ -103,6 +103,7 @@ Since:
*/
PHP_FUNCTION(dom_text_split_text)
{
+ zval *id;
xmlChar *cur;
xmlChar *first;
xmlChar *second;
@@ -113,11 +114,10 @@ PHP_FUNCTION(dom_text_split_text)
int length;
dom_object *intern;
- DOM_GET_THIS_OBJ(node, getThis(), xmlNodePtr, intern);
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &offset) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_text_class_entry, &offset) == FAILURE) {
return;
}
+ DOM_GET_OBJ(node, id, xmlNodePtr, intern);
if (node->type != XML_TEXT_NODE) {
RETURN_FALSE;
@@ -162,12 +162,14 @@ Since: DOM Level 3
*/
PHP_FUNCTION(dom_text_is_whitespace_in_element_content)
{
+ zval *id;
xmlNodePtr node;
dom_object *intern;
- DOM_GET_THIS_OBJ(node, getThis(), xmlNodePtr, intern);
-
- DOM_NO_ARGS();
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_text_class_entry) == FAILURE) {
+ return;
+ }
+ DOM_GET_OBJ(node, id, xmlNodePtr, intern);
if (xmlIsBlankNode(node)) {
RETURN_TRUE;