mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Declare XML_SAX_IMPL constant in stubs (#9732)
This commit is contained in:
parent
fd3d3117b5
commit
fc11a8abcb
4 changed files with 14 additions and 7 deletions
|
@ -46,4 +46,10 @@ enum php_xml_option {
|
|||
PHP_XML_OPTION_SKIP_WHITE
|
||||
};
|
||||
|
||||
#ifdef LIBXML_EXPAT_COMPAT
|
||||
#define PHP_XML_SAX_IMPL "libxml"
|
||||
#else
|
||||
#define PHP_XML_SAX_IMPL "expat"
|
||||
#endif
|
||||
|
||||
#endif /* PHP_XML_H */
|
||||
|
|
|
@ -264,12 +264,6 @@ PHP_MINIT_FUNCTION(xml)
|
|||
php_xml_mem_hdlrs.realloc_fcn = php_xml_realloc_wrapper;
|
||||
php_xml_mem_hdlrs.free_fcn = php_xml_free_wrapper;
|
||||
|
||||
#ifdef LIBXML_EXPAT_COMPAT
|
||||
REGISTER_STRING_CONSTANT("XML_SAX_IMPL", "libxml", CONST_CS|CONST_PERSISTENT);
|
||||
#else
|
||||
REGISTER_STRING_CONSTANT("XML_SAX_IMPL", "expat", CONST_CS|CONST_PERSISTENT);
|
||||
#endif
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,12 @@ const XML_OPTION_SKIP_TAGSTART = UNKNOWN;
|
|||
*/
|
||||
const XML_OPTION_SKIP_WHITE = UNKNOWN;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @cvalue PHP_XML_SAX_IMPL
|
||||
*/
|
||||
const XML_SAX_IMPL = UNKNOWN;
|
||||
|
||||
function xml_parser_create(?string $encoding = null): XMLParser {}
|
||||
|
||||
function xml_parser_create_ns(?string $encoding = null, string $separator = ":"): XMLParser {}
|
||||
|
|
3
ext/xml/xml_arginfo.h
generated
3
ext/xml/xml_arginfo.h
generated
|
@ -1,5 +1,5 @@
|
|||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 97ce33bf2fbe970f7ca1c1845fbf5063dbd118dd */
|
||||
* Stub hash: fa0ee6afa65408c431e89e542dc8292737c4ff80 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_xml_parser_create, 0, 0, XMLParser, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
|
||||
|
@ -166,6 +166,7 @@ static void register_xml_symbols(int module_number)
|
|||
REGISTER_LONG_CONSTANT("XML_OPTION_TARGET_ENCODING", PHP_XML_OPTION_TARGET_ENCODING, CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("XML_OPTION_SKIP_TAGSTART", PHP_XML_OPTION_SKIP_TAGSTART, CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("XML_OPTION_SKIP_WHITE", PHP_XML_OPTION_SKIP_WHITE, CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("XML_SAX_IMPL", PHP_XML_SAX_IMPL, CONST_PERSISTENT);
|
||||
}
|
||||
|
||||
static zend_class_entry *register_class_XMLParser(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue