summaryrefslogtreecommitdiff
path: root/ext/dom/notation.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/notation.c')
-rw-r--r--ext/dom/notation.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/ext/dom/notation.c b/ext/dom/notation.c
index 4c0258cc1f..dc63f1516d 100644
--- a/ext/dom/notation.c
+++ b/ext/dom/notation.c
@@ -45,22 +45,19 @@ readonly=yes
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-54F2B4D0
Since:
*/
-int dom_notation_public_id_read(dom_object *obj, zval **retval TSRMLS_DC)
+int dom_notation_public_id_read(dom_object *obj, zval *retval TSRMLS_DC)
{
- xmlEntityPtr nodep;
-
- nodep = (xmlEntityPtr) dom_object_get_node(obj);
+ xmlEntityPtr nodep = (xmlEntityPtr) dom_object_get_node(obj);
if (nodep == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
- ALLOC_ZVAL(*retval);
if (nodep->ExternalID) {
- ZVAL_STRING(*retval, (char *) (nodep->ExternalID), 1);
+ ZVAL_STRING(retval, (char *) (nodep->ExternalID));
} else {
- ZVAL_EMPTY_STRING(*retval);
+ ZVAL_EMPTY_STRING(retval);
}
return SUCCESS;
@@ -73,22 +70,19 @@ readonly=yes
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-E8AAB1D0
Since:
*/
-int dom_notation_system_id_read(dom_object *obj, zval **retval TSRMLS_DC)
+int dom_notation_system_id_read(dom_object *obj, zval *retval TSRMLS_DC)
{
- xmlEntityPtr nodep;
-
- nodep = (xmlEntityPtr) dom_object_get_node(obj);
+ xmlEntityPtr nodep = (xmlEntityPtr) dom_object_get_node(obj);
if (nodep == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
- ALLOC_ZVAL(*retval);
if (nodep->SystemID) {
- ZVAL_STRING(*retval, (char *) (nodep->SystemID), 1);
+ ZVAL_STRING(retval, (char *) (nodep->SystemID));
} else {
- ZVAL_EMPTY_STRING(*retval);
+ ZVAL_EMPTY_STRING(retval);
}
return SUCCESS;