diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2018-09-16 11:07:40 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-09-16 11:07:40 +0200 |
commit | ca6caa0cb28b4e6d426f925e929baf06e29ae8dd (patch) | |
tree | 519759f0e01553b902c8db322230b990cde03e49 /ext/xml/php_xml.h | |
parent | ba300b69d2944678e5d8164b7abd99bf296ff06e (diff) | |
download | php-git-ca6caa0cb28b4e6d426f925e929baf06e29ae8dd.tar.gz |
Make ext/xml API private
Also remove dead functions
Diffstat (limited to 'ext/xml/php_xml.h')
-rw-r--r-- | ext/xml/php_xml.h | 115 |
1 files changed, 4 insertions, 111 deletions
diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h index a4bdef8548..3ab77c4f6a 100644 --- a/ext/xml/php_xml.h +++ b/ext/xml/php_xml.h @@ -22,132 +22,25 @@ #define PHP_XML_H #ifdef HAVE_XML + extern zend_module_entry xml_module_entry; #define xml_module_ptr &xml_module_entry #include "php_version.h" #define PHP_XML_VERSION PHP_VERSION -#else -#define xml_module_ptr NULL -#endif - -#ifdef HAVE_XML - #include "expat_compat.h" #ifdef XML_UNICODE #error "UTF-16 Unicode support not implemented!" #endif -ZEND_BEGIN_MODULE_GLOBALS(xml) - XML_Char *default_encoding; -ZEND_END_MODULE_GLOBALS(xml) - -typedef struct { - int case_folding; - XML_Parser parser; - XML_Char *target_encoding; - - zval index; - zval startElementHandler; - zval endElementHandler; - zval characterDataHandler; - zval processingInstructionHandler; - zval defaultHandler; - zval unparsedEntityDeclHandler; - zval notationDeclHandler; - zval externalEntityRefHandler; - zval unknownEncodingHandler; - zval startNamespaceDeclHandler; - zval endNamespaceDeclHandler; - - zend_function *startElementPtr; - zend_function *endElementPtr; - zend_function *characterDataPtr; - zend_function *processingInstructionPtr; - zend_function *defaultPtr; - zend_function *unparsedEntityDeclPtr; - zend_function *notationDeclPtr; - zend_function *externalEntityRefPtr; - zend_function *unknownEncodingPtr; - zend_function *startNamespaceDeclPtr; - zend_function *endNamespaceDeclPtr; - - zval object; - - zval data; - zval info; - int level; - int toffset; - int curtag; - zval *ctag; - char **ltags; - int lastwasopen; - int skipwhite; - int isparsing; - - XML_Char *baseURI; -} xml_parser; - - -typedef struct { - XML_Char *name; - char (*decoding_function)(unsigned short); - unsigned short (*encoding_function)(unsigned char); -} xml_encoding; - - -enum php_xml_option { - PHP_XML_OPTION_CASE_FOLDING = 1, - PHP_XML_OPTION_TARGET_ENCODING, - PHP_XML_OPTION_SKIP_TAGSTART, - PHP_XML_OPTION_SKIP_WHITE -}; - -/* for xml_parse_into_struct */ - -#define XML_MAXLEVEL 255 /* XXX this should be dynamic */ - -PHP_FUNCTION(xml_parser_create); -PHP_FUNCTION(xml_parser_create_ns); -PHP_FUNCTION(xml_set_object); -PHP_FUNCTION(xml_set_element_handler); -PHP_FUNCTION(xml_set_character_data_handler); -PHP_FUNCTION(xml_set_processing_instruction_handler); -PHP_FUNCTION(xml_set_default_handler); -PHP_FUNCTION(xml_set_unparsed_entity_decl_handler); -PHP_FUNCTION(xml_set_notation_decl_handler); -PHP_FUNCTION(xml_set_external_entity_ref_handler); -PHP_FUNCTION(xml_set_start_namespace_decl_handler); -PHP_FUNCTION(xml_set_end_namespace_decl_handler); -PHP_FUNCTION(xml_parse); -PHP_FUNCTION(xml_get_error_code); -PHP_FUNCTION(xml_error_string); -PHP_FUNCTION(xml_get_current_line_number); -PHP_FUNCTION(xml_get_current_column_number); -PHP_FUNCTION(xml_get_current_byte_index); -PHP_FUNCTION(xml_parser_free); -PHP_FUNCTION(xml_parser_set_option); -PHP_FUNCTION(xml_parser_get_option); -PHP_FUNCTION(utf8_encode); -PHP_FUNCTION(utf8_decode); -PHP_FUNCTION(xml_parse_into_struct); - -PHP_XML_API char *_xml_zval_strdup(zval *); -PHP_XML_API zend_string *xml_utf8_decode(const XML_Char *, size_t, const XML_Char *); -PHP_XML_API zend_string *xml_utf8_encode(const char *, size_t, const XML_Char *); - -#endif /* HAVE_LIBEXPAT */ +#else +#define xml_module_ptr NULL +#endif /* HAVE_XML */ #define phpext_xml_ptr xml_module_ptr -#define XML(v) ZEND_MODULE_GLOBALS_ACCESSOR(xml, v) - -#if defined(ZTS) && defined(COMPILE_DL_XML) -ZEND_TSRMLS_CACHE_EXTERN() -#endif - #endif /* PHP_XML_H */ /* |