summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/dom/php_dom.c12
-rw-r--r--ext/dom/xml_common.h3
-rw-r--r--ext/simplexml/php_simplexml.h2
-rw-r--r--ext/simplexml/simplexml.c11
4 files changed, 4 insertions, 24 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index e3ff995804..08d8f233a4 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -37,8 +37,6 @@
#define PHP_XPATH 1
#define PHP_XPTR 2
-DOM_IMPORT int xml_parser_inited;
-
zend_object_handlers dom_object_handlers;
static HashTable classes;
@@ -580,10 +578,7 @@ PHP_MINIT_FUNCTION(dom)
REGISTER_LONG_CONSTANT("XML_ATTRIBUTE_ENUMERATION", XML_ATTRIBUTE_ENUMERATION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("XML_ATTRIBUTE_NOTATION", XML_ATTRIBUTE_NOTATION, CONST_CS | CONST_PERSISTENT);
- if (!xml_parser_inited) {
- xmlInitThreads();
- xml_parser_inited = 1;
- }
+ xmlInitParser();
return SUCCESS;
}
@@ -611,10 +606,7 @@ PHP_MINFO_FUNCTION(dom)
PHP_MSHUTDOWN_FUNCTION(dom)
{
- if (xml_parser_inited) {
- xmlCleanupParser();
- xml_parser_inited = 0;
- }
+ xmlCleanupParser();
zend_hash_destroy(&dom_domstringlist_prop_handlers);
zend_hash_destroy(&dom_namelist_prop_handlers);
diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h
index f931cfa3bb..1e3087e0ab 100644
--- a/ext/dom/xml_common.h
+++ b/ext/dom/xml_common.h
@@ -61,9 +61,6 @@ typedef struct _dom_object {
#else
#define PHPAPI __declspec(dllimport)
#endif /* DOM_EXPORTS */
-#define DOM_IMPORT __declspec(dllimport)
-#else
-#define DOM_IMPORT extern
#endif /* PHP_WIN32 */
#ifdef ZTS
diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h
index 233452dafa..ec5ac2671c 100644
--- a/ext/simplexml/php_simplexml.h
+++ b/ext/simplexml/php_simplexml.h
@@ -26,10 +26,8 @@ extern zend_module_entry simplexml_module_entry;
#ifdef PHP_WIN32
#define PHP_SIMPLEXML_API __declspec(dllexport)
-#define SIMPLEXML_IMPORT __declspec(dllimport)
#else
#define PHP_SIMPLEXML_API
-#define SIMPLEXML_IMPORT extern
#endif
#ifdef ZTS
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 367010454b..3cee43d969 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -28,7 +28,6 @@
#include "php_simplexml.h"
zend_class_entry *sxe_class_entry;
-SIMPLEXML_IMPORT int xml_parser_inited;
#define SKIP_TEXT(__p) \
if ((__p)->type == XML_TEXT_NODE) { \
@@ -999,10 +998,7 @@ PHP_MINIT_FUNCTION(simplexml)
sxe.create_object = sxe_object_new;
sxe_class_entry = zend_register_internal_class(&sxe TSRMLS_CC);
- if (!xml_parser_inited) {
- xmlInitThreads();
- xml_parser_inited = 1;
- }
+ xmlInitParser();
return SUCCESS;
}
@@ -1012,10 +1008,7 @@ PHP_MINIT_FUNCTION(simplexml)
*/
PHP_MSHUTDOWN_FUNCTION(simplexml)
{
- if (xml_parser_inited) {
- xmlCleanupParser();
- xml_parser_inited = 0;
- }
+ xmlCleanupParser();
return SUCCESS;
}