diff options
author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 19:39:21 -0400 |
---|---|---|
committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 19:39:21 -0400 |
commit | 6821b67124604da690c5e9276d5370d679c63ac8 (patch) | |
tree | befb4ca2520eb577950cef6cb76d10b914cbf67a /ext/dom/documentfragment.c | |
parent | cd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f (diff) | |
download | php-6821b67124604da690c5e9276d5370d679c63ac8.tar.gz |
Imported Upstream version 5.3.0RC1upstream/5.3.0_RC1upstream/5.3.0RC1
Diffstat (limited to 'ext/dom/documentfragment.c')
-rw-r--r-- | ext/dom/documentfragment.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index 88b30e1c0..4bd53104d 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documentfragment.c,v 1.15.2.1.2.5 2008/12/31 11:17:37 sebastian Exp $ */ +/* $Id: documentfragment.c,v 1.15.2.1.2.1.2.11 2008/12/31 11:15:36 sebastian Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -27,13 +27,10 @@ #if HAVE_LIBXML && HAVE_DOM #include "php_dom.h" - /* {{{ arginfo */ -static ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_documentfragement_construct, 0, 0, 0) ZEND_END_ARG_INFO(); -static ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_documentfragement_appendXML, 0, 0, 1) ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO(); @@ -46,7 +43,7 @@ ZEND_END_ARG_INFO(); * Since: */ -zend_function_entry php_dom_documentfragment_class_functions[] = { +const zend_function_entry php_dom_documentfragment_class_functions[] = { PHP_ME(domdocumentfragment, __construct, arginfo_dom_documentfragement_construct, ZEND_ACC_PUBLIC) PHP_ME(domdocumentfragment, appendXML, arginfo_dom_documentfragement_appendXML, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} @@ -59,14 +56,15 @@ PHP_METHOD(domdocumentfragment, __construct) zval *id; xmlNodePtr nodep = NULL, oldnode = NULL; dom_object *intern; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_documentfragment_class_entry) == FAILURE) { - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); nodep = xmlNewDocFragment(NULL); if (!nodep) { @@ -88,7 +86,8 @@ PHP_METHOD(domdocumentfragment, __construct) /* php_dom_xmlSetTreeDoc is a custom implementation of xmlSetTreeDoc needed for hack in appendXML due to libxml bug - no need to share this function */ -static void php_dom_xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) { +static void php_dom_xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) /* {{{ */ +{ xmlAttrPtr prop; xmlNodePtr cur; @@ -117,6 +116,7 @@ static void php_dom_xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) { tree->doc = doc; } } +/* }}} */ /* {{{ proto void DOMDocumentFragment::appendXML(string data); */ PHP_METHOD(domdocumentfragment, appendXML) { @@ -154,5 +154,15 @@ PHP_METHOD(domdocumentfragment, appendXML) { RETURN_TRUE; } +/* }}} */ #endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 + */ |