]> granicus.if.org Git - php/commitdiff
improved code (after suggestion by helly)
authorChristian Stocker <chregu@php.net>
Sun, 16 Jul 2006 16:04:09 +0000 (16:04 +0000)
committerChristian Stocker <chregu@php.net>
Sun, 16 Jul 2006 16:04:09 +0000 (16:04 +0000)
ext/dom/node.c

index 5ae4827901642df2102e5169f7bb36188d13c168..acc8f4197aa50ebc56464551e7c5ab8c63e14782 100644 (file)
@@ -1870,15 +1870,12 @@ PHP_METHOD(domnode, getNodePath)
        char *value;
        
 
-       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) {
-               return;
-       }
-
-       DOM_GET_OBJ(nodep, id, xmlNodePtr, intern);
+       
+       DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern);
 
        value = xmlGetNodePath(nodep);
        if (value == NULL) {
-               RETURN_EMPTY_STRING();
+               RETURN_NULL();
        } else {
                RETVAL_STRING(value, 1);
                xmlFree(value);