mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Revert "Stop using reserved names in dom"
This reverts commit 013bc53f0c
.
This somehow breaks the Windows build. Will investigate later.
This commit is contained in:
parent
ff770d023a
commit
dda96768ec
11 changed files with 29 additions and 29 deletions
|
@ -1285,7 +1285,7 @@ PHP_METHOD(DOMDocument, __construct)
|
|||
}
|
||||
/* }}} end DOMDocument::__construct */
|
||||
|
||||
const char *dom_get_valid_file_path(const char *source, char *resolved_path, int resolved_path_len ) /* {{{ */
|
||||
const char *_dom_get_valid_file_path(const char *source, char *resolved_path, int resolved_path_len ) /* {{{ */
|
||||
{
|
||||
xmlURI *uri;
|
||||
xmlChar *escsource;
|
||||
|
@ -1372,7 +1372,7 @@ xmlDocPtr dom_document_parser(zval *id, dom_load_mode mode, const char *source,
|
|||
zend_argument_value_error(1, "must not contain any null bytes");
|
||||
return NULL;
|
||||
}
|
||||
const char *file_dest = dom_get_valid_file_path(source, resolved_path, MAXPATHLEN);
|
||||
const char *file_dest = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN);
|
||||
if (file_dest) {
|
||||
ctxt = xmlCreateFileParserCtxt(file_dest);
|
||||
}
|
||||
|
@ -1853,7 +1853,7 @@ PHP_METHOD(DOMDocument, validate)
|
|||
/* }}} */
|
||||
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
static void dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
|
||||
static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
|
||||
{
|
||||
zval *id;
|
||||
xmlDoc *docp;
|
||||
|
@ -1890,7 +1890,7 @@ static void dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type)
|
|||
zend_argument_value_error(1, "must not contain any null bytes");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
valid_file = dom_get_valid_file_path(source, resolved_path, MAXPATHLEN);
|
||||
valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN);
|
||||
if (!valid_file) {
|
||||
PHP_LIBXML_RESTORE_GLOBALS(new_parser_ctxt);
|
||||
php_error_docref(NULL, E_WARNING, "Invalid Schema file source");
|
||||
|
@ -1953,18 +1953,18 @@ static void dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type)
|
|||
/* {{{ */
|
||||
PHP_METHOD(DOMDocument, schemaValidate)
|
||||
{
|
||||
dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE);
|
||||
_dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE);
|
||||
}
|
||||
/* }}} end dom_document_schema_validate_file */
|
||||
|
||||
/* {{{ */
|
||||
PHP_METHOD(DOMDocument, schemaValidateSource)
|
||||
{
|
||||
dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING);
|
||||
_dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING);
|
||||
}
|
||||
/* }}} end dom_document_schema_validate */
|
||||
|
||||
static void dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
|
||||
static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
|
||||
{
|
||||
zval *id;
|
||||
xmlDoc *docp;
|
||||
|
@ -1996,7 +1996,7 @@ static void dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int type
|
|||
zend_argument_value_error(1, "must not contain any null bytes");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
valid_file = dom_get_valid_file_path(source, resolved_path, MAXPATHLEN);
|
||||
valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN);
|
||||
if (!valid_file) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid RelaxNG file source");
|
||||
RETURN_FALSE;
|
||||
|
@ -2050,14 +2050,14 @@ static void dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int type
|
|||
/* {{{ */
|
||||
PHP_METHOD(DOMDocument, relaxNGValidate)
|
||||
{
|
||||
dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE);
|
||||
_dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE);
|
||||
}
|
||||
/* }}} end dom_document_relaxNG_validate_file */
|
||||
|
||||
/* {{{ */
|
||||
PHP_METHOD(DOMDocument, relaxNGValidateSource)
|
||||
{
|
||||
dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING);
|
||||
_dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING);
|
||||
}
|
||||
/* }}} end dom_document_relaxNG_validate_xml */
|
||||
|
||||
|
|
|
@ -476,7 +476,7 @@ PHP_METHOD(DOMElement, setAttribute)
|
|||
}
|
||||
/* }}} end dom_element_set_attribute */
|
||||
|
||||
typedef struct dom_deep_ns_redef_item {
|
||||
typedef struct _dom_deep_ns_redef_item {
|
||||
xmlNodePtr current_node;
|
||||
xmlNsPtr defined_ns;
|
||||
} dom_deep_ns_redef_item;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
/* libxml2 reserves 2 pointer-sized words for interned strings */
|
||||
#define LXML_INTERNED_STRINGS_SIZE (sizeof(void *) * 2)
|
||||
|
||||
typedef struct work_list_item {
|
||||
typedef struct _work_list_item {
|
||||
lxb_dom_node_t *node;
|
||||
uintptr_t current_active_namespace;
|
||||
xmlNodePtr lxml_parent;
|
||||
|
|
|
@ -43,14 +43,14 @@ typedef void (*lexbor_libxml2_bridge_tree_error_reporter)(
|
|||
size_t len
|
||||
);
|
||||
|
||||
typedef struct lexbor_libxml2_bridge_extracted_observations {
|
||||
typedef struct _lexbor_libxml2_bridge_extracted_observations {
|
||||
bool has_explicit_html_tag;
|
||||
bool has_explicit_head_tag;
|
||||
bool has_explicit_body_tag;
|
||||
php_libxml_quirks_mode quirks_mode;
|
||||
} lexbor_libxml2_bridge_extracted_observations;
|
||||
|
||||
typedef struct lexbor_libxml2_bridge_parse_context {
|
||||
typedef struct _lexbor_libxml2_bridge_parse_context {
|
||||
/* Private fields */
|
||||
lexbor_libxml2_bridge_tokenizer_error_reporter tokenizer_error_reporter;
|
||||
lexbor_libxml2_bridge_tree_error_reporter tree_error_reporter;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "html_collection.h"
|
||||
#include "namespace_compat.h"
|
||||
|
||||
typedef struct dom_named_item {
|
||||
typedef struct _dom_named_item {
|
||||
dom_object *context_intern;
|
||||
xmlNodePtr node;
|
||||
} dom_named_item;
|
||||
|
|
|
@ -30,7 +30,7 @@ PHP_DOM_EXPORT const php_dom_ns_magic_token *php_dom_ns_is_xlink_magic_token = (
|
|||
PHP_DOM_EXPORT const php_dom_ns_magic_token *php_dom_ns_is_xml_magic_token = (const php_dom_ns_magic_token *) DOM_XML_NS_URI;
|
||||
PHP_DOM_EXPORT const php_dom_ns_magic_token *php_dom_ns_is_xmlns_magic_token = (const php_dom_ns_magic_token *) DOM_XMLNS_NS_URI;
|
||||
|
||||
struct php_dom_libxml_ns_mapper {
|
||||
struct _php_dom_libxml_ns_mapper {
|
||||
php_libxml_private_data_header header;
|
||||
/* This is used almost all the time for HTML documents, so it makes sense to cache this. */
|
||||
xmlNsPtr html_ns;
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
struct php_dom_ns_magic_token;
|
||||
typedef struct php_dom_ns_magic_token php_dom_ns_magic_token;
|
||||
|
||||
struct php_dom_libxml_ns_mapper;
|
||||
typedef struct php_dom_libxml_ns_mapper php_dom_libxml_ns_mapper;
|
||||
struct _php_dom_libxml_ns_mapper;
|
||||
typedef struct _php_dom_libxml_ns_mapper php_dom_libxml_ns_mapper;
|
||||
|
||||
PHP_DOM_EXPORT extern const php_dom_ns_magic_token *php_dom_ns_is_html_magic_token;
|
||||
PHP_DOM_EXPORT extern const php_dom_ns_magic_token *php_dom_ns_is_mathml_magic_token;
|
||||
|
@ -40,8 +40,8 @@ PHP_DOM_EXPORT extern const php_dom_ns_magic_token *php_dom_ns_is_xlink_magic_to
|
|||
PHP_DOM_EXPORT extern const php_dom_ns_magic_token *php_dom_ns_is_xml_magic_token;
|
||||
PHP_DOM_EXPORT extern const php_dom_ns_magic_token *php_dom_ns_is_xmlns_magic_token;
|
||||
|
||||
typedef struct php_libxml_private_data_header php_libxml_private_data_header;
|
||||
struct php_libxml_private_data_header;
|
||||
typedef struct _php_libxml_private_data_header php_libxml_private_data_header;
|
||||
struct _php_libxml_private_data_header;
|
||||
|
||||
/* These functions make it possible to make a namespace declaration also visible as an attribute by
|
||||
* creating an equivalent attribute node. */
|
||||
|
@ -64,7 +64,7 @@ PHP_DOM_EXPORT bool php_dom_ns_is_fast(const xmlNode *nodep, const php_dom_ns_ma
|
|||
PHP_DOM_EXPORT bool php_dom_ns_is_fast_ex(xmlNsPtr ns, const php_dom_ns_magic_token *magic_token);
|
||||
PHP_DOM_EXPORT bool php_dom_ns_is_html_and_document_is_html(const xmlNode *nodep);
|
||||
|
||||
typedef struct php_dom_in_scope_ns {
|
||||
typedef struct _php_dom_in_scope_ns {
|
||||
xmlNsPtr *list;
|
||||
size_t count;
|
||||
bool origin_is_ns_compat;
|
||||
|
|
|
@ -149,7 +149,7 @@ static xmlNodePtr php_dom_create_fake_namespace_decl_node_ptr(xmlNodePtr nodep,
|
|||
typedef zend_result (*dom_read_t)(dom_object *obj, zval *retval);
|
||||
typedef zend_result (*dom_write_t)(dom_object *obj, zval *newval);
|
||||
|
||||
typedef struct dom_prop_handler {
|
||||
typedef struct _dom_prop_handler {
|
||||
dom_read_t read_func;
|
||||
dom_write_t write_func;
|
||||
} dom_prop_handler;
|
||||
|
|
|
@ -64,7 +64,7 @@ extern zend_module_entry dom_module_entry;
|
|||
/* Define a custom type for iterating using an unused nodetype */
|
||||
#define DOM_NODESET XML_XINCLUDE_START
|
||||
|
||||
typedef struct dom_xpath_object {
|
||||
typedef struct _dom_xpath_object {
|
||||
php_dom_xpath_callbacks xpath_callbacks;
|
||||
bool register_node_ns;
|
||||
dom_object dom;
|
||||
|
@ -77,7 +77,7 @@ static inline dom_xpath_object *php_xpath_obj_from_obj(zend_object *obj) {
|
|||
|
||||
#define Z_XPATHOBJ_P(zv) php_xpath_obj_from_obj(Z_OBJ_P((zv)))
|
||||
|
||||
typedef struct dom_nnodemap_object {
|
||||
typedef struct _dom_nnodemap_object {
|
||||
dom_object *baseobj;
|
||||
zval baseobj_zv;
|
||||
int nodetype;
|
||||
|
@ -107,7 +107,7 @@ typedef struct {
|
|||
dom_object dom;
|
||||
} dom_object_namespace_node;
|
||||
|
||||
typedef enum dom_iterator_type {
|
||||
typedef enum _dom_iterator_type {
|
||||
DOM_NODELIST,
|
||||
DOM_NAMEDNODEMAP,
|
||||
DOM_DTD_NAMEDNODEMAP,
|
||||
|
|
|
@ -80,8 +80,8 @@ PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj);
|
|||
__id = ZEND_THIS; \
|
||||
DOM_GET_OBJ(__ptr, __id, __prtype, __intern);
|
||||
|
||||
struct php_dom_libxml_ns_mapper;
|
||||
typedef struct php_dom_libxml_ns_mapper php_dom_libxml_ns_mapper;
|
||||
struct _php_dom_libxml_ns_mapper;
|
||||
typedef struct _php_dom_libxml_ns_mapper php_dom_libxml_ns_mapper;
|
||||
|
||||
static zend_always_inline php_dom_libxml_ns_mapper *php_dom_get_ns_mapper(dom_object *intern)
|
||||
{
|
||||
|
|
|
@ -65,8 +65,8 @@ typedef struct {
|
|||
size_t modification_nr;
|
||||
} php_libxml_cache_tag;
|
||||
|
||||
typedef struct php_libxml_private_data_header {
|
||||
void (*dtor)(struct php_libxml_private_data_header *);
|
||||
typedef struct _php_libxml_private_data_header {
|
||||
void (*dtor)(struct _php_libxml_private_data_header *);
|
||||
/* extra fields */
|
||||
} php_libxml_private_data_header;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue