Skip to content

Avoid C99 typedef redeclaration error #15079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
configurationParameters: >-
--${{ matrix.debug && 'enable' || 'disable' }}-debug
--${{ matrix.zts && 'enable' || 'disable' }}-zts
${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address" CC=clang-16 CXX=clang++-16' || '' }}
${{ matrix.asan && 'CFLAGS="-std=c99 -fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address" CC=clang-16 CXX=clang++-16' || '' }}
skipSlow: ${{ matrix.asan }}
- name: make
run: make -j$(/usr/bin/nproc) >/dev/null
Expand Down
4 changes: 2 additions & 2 deletions TSRM/TSRM.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,15 +781,15 @@ TSRM_API size_t tsrm_get_ls_cache_tcb_offset(void)
!defined(__HAIKU__)
size_t ret;

asm ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
__asm__ ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
: "=r" (ret));
return ret;
#elif defined(__i386__) && defined(__GNUC__) && !defined(__FreeBSD__) && \
!defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__MUSL__) && \
!defined(__HAIKU__)
size_t ret;

asm ("leal _tsrm_ls_cache@ntpoff,%0"
__asm__ ("leal _tsrm_ls_cache@ntpoff,%0"
: "=r" (ret));
return ret;
#elif defined(__aarch64__)
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_builtin_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

#include "zend_types.h"

typedef struct _zval_struct zval;
struct _zval_struct;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stupid question maybe, but why do we need this at all? The typedef is defined in zend_types.h which is included right above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this one is indeed probably unneeded.


zend_result zend_startup_builtin_functions(void);

BEGIN_EXTERN_C()
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options, int limit);
ZEND_API void zend_fetch_debug_backtrace(struct _zval_struct *return_value, int skip_last, int options, int limit);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usage of struct _zval_struct instead of zval looks terrible for me.

Note that duplicate declarations were introduced by previous "header clenup" patches (like 6335264). Now you remove them and make sources even worse...

END_EXTERN_C()

#endif /* ZEND_BUILTIN_FUNCTIONS_H */
6 changes: 3 additions & 3 deletions Zend/zend_compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ typedef struct _zend_live_range {
uint32_t end;
} zend_live_range;

typedef struct _zend_property_info zend_property_info;
struct _zend_property_info;

/* Compilation context that is different for each op array. */
typedef struct _zend_oparray_context {
Expand All @@ -204,7 +204,7 @@ typedef struct _zend_oparray_context {
int last_brk_cont;
zend_brk_cont_element *brk_cont_array;
HashTable *labels;
const zend_property_info *active_property_info;
const struct _zend_property_info *active_property_info;
zend_property_hook_kind active_property_hook_kind;
bool in_jmp_frameless_branch;
} zend_oparray_context;
Expand Down Expand Up @@ -426,7 +426,7 @@ typedef struct _zend_property_info {
HashTable *attributes;
zend_class_entry *ce;
zend_type type;
const zend_property_info *prototype;
const struct _zend_property_info *prototype;
zend_function **hooks;
} zend_property_info;

Expand Down
1 change: 1 addition & 0 deletions Zend/zend_frameless_function.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <stddef.h>

#include "zend_frameless_function.h"
#include "zend_types.h"

size_t zend_flf_count = 0;
size_t zend_flf_capacity = 0;
Expand Down
15 changes: 7 additions & 8 deletions Zend/zend_frameless_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,18 @@

BEGIN_EXTERN_C()

typedef struct _zval_struct zval;
typedef struct _zend_op zend_op;
typedef union _zend_function zend_function;
struct _zval_struct;
union _zend_function;

typedef void (*zend_frameless_function_0)(zval *return_value);
typedef void (*zend_frameless_function_1)(zval *return_value, zval *op1);
typedef void (*zend_frameless_function_2)(zval *return_value, zval *op1, zval *op2);
typedef void (*zend_frameless_function_3)(zval *return_value, zval *op1, zval *op2, zval *op3);
typedef void (*zend_frameless_function_0)(struct _zval_struct *return_value);
typedef void (*zend_frameless_function_1)(struct _zval_struct *return_value, struct _zval_struct *op1);
typedef void (*zend_frameless_function_2)(struct _zval_struct *return_value, struct _zval_struct *op1, struct _zval_struct *op2);
typedef void (*zend_frameless_function_3)(struct _zval_struct *return_value, struct _zval_struct *op1, struct _zval_struct *op2, struct _zval_struct *op3);

extern size_t zend_flf_count;
extern size_t zend_flf_capacity;
ZEND_API extern void **zend_flf_handlers;
ZEND_API extern zend_function **zend_flf_functions;
ZEND_API extern union _zend_function **zend_flf_functions;

typedef struct {
void *handler;
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_ini_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "zend_types.h"

typedef struct _zend_file_handle zend_file_handle;
struct _zend_file_handle;

/* Scanner modes */
#define ZEND_INI_SCANNER_NORMAL 0 /* Normal mode. [DEFAULT] */
Expand All @@ -32,7 +32,7 @@ typedef struct _zend_file_handle zend_file_handle;
BEGIN_EXTERN_C()
ZEND_COLD int zend_ini_scanner_get_lineno(void);
ZEND_COLD const char *zend_ini_scanner_get_filename(void);
zend_result zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mode);
zend_result zend_ini_open_file_for_scanning(struct _zend_file_handle *fh, int scanner_mode);
zend_result zend_ini_prepare_string_for_scanning(const char *str, int scanner_mode);
int ini_lex(zval *ini_lval);
void shutdown_ini_scanner(void);
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_map_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "zend_portability.h"

typedef struct _zend_string zend_string;
struct _zend_string;

#define ZEND_MAP_PTR_KIND_PTR 0
#define ZEND_MAP_PTR_KIND_PTR_OR_OFFSET 1
Expand Down Expand Up @@ -76,7 +76,7 @@ BEGIN_EXTERN_C()
ZEND_API void zend_map_ptr_reset(void);
ZEND_API void *zend_map_ptr_new(void);
ZEND_API void zend_map_ptr_extend(size_t last);
ZEND_API void zend_alloc_ce_cache(zend_string *type_name);
ZEND_API void zend_alloc_ce_cache(struct _zend_string *type_name);

END_EXTERN_C()

Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_object_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ ZEND_API HashTable *zend_std_get_properties_for(zend_object *obj, zend_prop_purp
* consumers of the get_properties_for API. */
ZEND_API HashTable *zend_get_properties_for(zval *obj, zend_prop_purpose purpose);

typedef struct _zend_property_info zend_property_info;
struct _zend_property_info;

ZEND_API zend_function *zend_get_property_hook_trampoline(
const zend_property_info *prop_info,
const struct _zend_property_info *prop_info,
zend_property_hook_kind kind, zend_string *prop_name);

#define zend_release_properties(ht) do { \
Expand Down
16 changes: 9 additions & 7 deletions Zend/zend_property_hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,21 @@

BEGIN_EXTERN_C()

typedef struct _zend_array zend_array;
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_object zend_object;
typedef struct _zend_object_iterator zend_object_iterator;
typedef struct _zval_struct zval;
/* Intentionally avoid typedef because of C99 redeclaration errors. */
struct _zend_array;
Copy link
Member

@TimWolla TimWolla Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing this, I already wondered before: Why is the struct tag even prefixed with an underscore instead of matching the typedef'd name exactly?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is just an convention to avoid having identical names. And maybe also as a hint that clients should use the typedef'd name.

struct _zend_class_entry;
struct _zend_object;
struct _zend_object_iterator;
struct _zval_struct;

typedef enum {
ZEND_PROPERTY_HOOK_GET = 0,
ZEND_PROPERTY_HOOK_SET = 1,
} zend_property_hook_kind;

ZEND_API zend_object_iterator *zend_hooked_object_get_iterator(zend_class_entry *ce, zval *object, int by_ref);
ZEND_API zend_array *zend_hooked_object_build_properties(zend_object *zobj);
ZEND_API struct _zend_object_iterator *zend_hooked_object_get_iterator(
struct _zend_class_entry *ce, struct _zval_struct *object, int by_ref);
ZEND_API struct _zend_array *zend_hooked_object_build_properties(struct _zend_object *zobj);

END_EXTERN_C()

Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_smart_str_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

#include <stddef.h>

typedef struct _zend_string zend_string;
struct _zend_string;

typedef struct {
/** See smart_str_extract() */
zend_string *s;
struct _zend_string *s;
size_t a;
} smart_str;

Expand Down
18 changes: 9 additions & 9 deletions Zend/zend_vm.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@

#include "zend_portability.h"

typedef struct _zend_op zend_op;
typedef struct _zend_execute_data zend_execute_data;
struct _zend_op;
struct _zend_execute_data;

BEGIN_EXTERN_C()

ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler(zend_op* opcode);
ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* opcode, uint32_t op1_info, uint32_t op2_info, uint32_t res_info);
ZEND_API void ZEND_FASTCALL zend_serialize_opcode_handler(zend_op *op);
ZEND_API void ZEND_FASTCALL zend_deserialize_opcode_handler(zend_op *op);
ZEND_API const void* ZEND_FASTCALL zend_get_opcode_handler_func(const zend_op *op);
ZEND_API const zend_op *zend_get_halt_op(void);
ZEND_API int ZEND_FASTCALL zend_vm_call_opcode_handler(zend_execute_data *ex);
ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler(struct _zend_op* opcode);
ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(struct _zend_op* opcode, uint32_t op1_info, uint32_t op2_info, uint32_t res_info);
ZEND_API void ZEND_FASTCALL zend_serialize_opcode_handler(struct _zend_op *op);
ZEND_API void ZEND_FASTCALL zend_deserialize_opcode_handler(struct _zend_op *op);
ZEND_API const void* ZEND_FASTCALL zend_get_opcode_handler_func(const struct _zend_op *op);
ZEND_API const struct _zend_op *zend_get_halt_op(void);
ZEND_API int ZEND_FASTCALL zend_vm_call_opcode_handler(struct _zend_execute_data *ex);
ZEND_API int zend_vm_kind(void);
ZEND_API bool zend_gcc_global_regs(void);

Expand Down
1 change: 0 additions & 1 deletion ext/bcmath/libbcmath/src/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "bcmath.h"
#include "convert.h"
#include "private.h"
#ifdef __SSE2__
# include <emmintrin.h>
#endif
Expand Down
1 change: 0 additions & 1 deletion ext/bcmath/libbcmath/src/recmul.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <stddef.h>
#include <assert.h>
#include <stdbool.h>
#include "private.h"
#include "convert.h"
#include "zend_alloc.h"

Expand Down
1 change: 0 additions & 1 deletion ext/bcmath/libbcmath/src/str2num.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include "bcmath.h"
#include "convert.h"
#include "private.h"
#include <stdbool.h>
#include <stddef.h>
#ifdef __SSE2__
Expand Down
2 changes: 2 additions & 0 deletions ext/dom/html5_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <libxml/parserInternals.h>
#include <libxml/HTMLtree.h>

typedef struct php_dom_ns_magic_token php_dom_ns_magic_token;

#define WORK_LIST_INIT_SIZE 128
/* libxml2 reserves 2 pointer-sized words for interned strings */
#define LXML_INTERNED_STRINGS_SIZE (sizeof(void *) * 2)
Expand Down
7 changes: 5 additions & 2 deletions ext/dom/html5_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,23 @@ void lexbor_libxml2_bridge_parse_set_error_callbacks(
lexbor_libxml2_bridge_tokenizer_error_reporter tokenizer_error_reporter,
lexbor_libxml2_bridge_tree_error_reporter tree_error_reporter
);

struct php_dom_private_data;

lexbor_libxml2_bridge_status lexbor_libxml2_bridge_convert_document(
lxb_html_document_t *document,
xmlDocPtr *doc_out,
bool compact_text_nodes,
bool create_default_ns,
php_dom_private_data *private_data
struct php_dom_private_data *private_data
);
lexbor_libxml2_bridge_status lexbor_libxml2_bridge_convert_fragment(
lxb_dom_node_t *start_node,
xmlDocPtr lxml_doc,
xmlNodePtr *fragment_out,
bool compact_text_nodes,
bool create_default_ns,
php_dom_private_data *private_data
struct php_dom_private_data *private_data
);
void lexbor_libxml2_bridge_report_errors(
const lexbor_libxml2_bridge_parse_context *ctx,
Expand Down
2 changes: 2 additions & 0 deletions ext/dom/namespace_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "private_data.h"
#include "internal_helpers.h"

typedef struct php_dom_ns_magic_token php_dom_ns_magic_token;

/* The actual value of these doesn't matter as long as they serve as a unique ID.
* They need to be pointers because the `_private` field is a pointer, however we can choose the contents ourselves.
* We need keep these at least 4-byte aligned because the pointer may be tagged (although for now 2 byte alignment works too).
Expand Down
39 changes: 18 additions & 21 deletions ext/dom/namespace_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,32 @@
#define DOM_XMLNS_NS_URI "http://www.w3.org/2000/xmlns/"

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;

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;
PHP_DOM_EXPORT extern const php_dom_ns_magic_token *php_dom_ns_is_svg_magic_token;
PHP_DOM_EXPORT extern const php_dom_ns_magic_token *php_dom_ns_is_xlink_magic_token;
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;
PHP_DOM_EXPORT extern const struct php_dom_ns_magic_token *php_dom_ns_is_html_magic_token;
PHP_DOM_EXPORT extern const struct php_dom_ns_magic_token *php_dom_ns_is_mathml_magic_token;
PHP_DOM_EXPORT extern const struct php_dom_ns_magic_token *php_dom_ns_is_svg_magic_token;
PHP_DOM_EXPORT extern const struct php_dom_ns_magic_token *php_dom_ns_is_xlink_magic_token;
PHP_DOM_EXPORT extern const struct php_dom_ns_magic_token *php_dom_ns_is_xml_magic_token;
PHP_DOM_EXPORT extern const struct php_dom_ns_magic_token *php_dom_ns_is_xmlns_magic_token;

/* These functions make it possible to make a namespace declaration also visible as an attribute by
* creating an equivalent attribute node. */

PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_ensure_html_ns(php_dom_libxml_ns_mapper *mapper);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_ensure_prefixless_xmlns_ns(php_dom_libxml_ns_mapper *mapper);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_get_ns(php_dom_libxml_ns_mapper *mapper, zend_string *prefix, zend_string *uri);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_get_ns_raw_prefix_string(php_dom_libxml_ns_mapper *mapper, const xmlChar *prefix, size_t prefix_len, zend_string *uri);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_get_ns_raw_strings_nullsafe(php_dom_libxml_ns_mapper *mapper, const char *prefix, const char *uri);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_ensure_html_ns(struct php_dom_libxml_ns_mapper *mapper);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_ensure_prefixless_xmlns_ns(struct php_dom_libxml_ns_mapper *mapper);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_get_ns(struct php_dom_libxml_ns_mapper *mapper, zend_string *prefix, zend_string *uri);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_get_ns_raw_prefix_string(struct php_dom_libxml_ns_mapper *mapper, const xmlChar *prefix, size_t prefix_len, zend_string *uri);
PHP_DOM_EXPORT xmlNsPtr php_dom_libxml_ns_mapper_get_ns_raw_strings_nullsafe(struct php_dom_libxml_ns_mapper *mapper, const char *prefix, const char *uri);

PHP_DOM_EXPORT php_dom_libxml_ns_mapper *php_dom_get_ns_mapper(dom_object *object);
PHP_DOM_EXPORT void php_dom_ns_compat_mark_attribute_list(php_dom_libxml_ns_mapper *mapper, xmlNodePtr node);
PHP_DOM_EXPORT void php_dom_libxml_reconcile_modern(php_dom_libxml_ns_mapper *ns_mapper, xmlNodePtr node);
PHP_DOM_EXPORT struct php_dom_libxml_ns_mapper *php_dom_get_ns_mapper(dom_object *object);
PHP_DOM_EXPORT void php_dom_ns_compat_mark_attribute_list(struct php_dom_libxml_ns_mapper *mapper, xmlNodePtr node);
PHP_DOM_EXPORT void php_dom_libxml_reconcile_modern(struct php_dom_libxml_ns_mapper *ns_mapper, xmlNodePtr node);
PHP_DOM_EXPORT void php_dom_reconcile_attribute_namespace_after_insertion(xmlAttrPtr attrp);
PHP_DOM_EXPORT xmlAttrPtr php_dom_ns_compat_mark_attribute(php_dom_libxml_ns_mapper *mapper, xmlNodePtr node, xmlNsPtr ns);
PHP_DOM_EXPORT xmlAttrPtr php_dom_ns_compat_mark_attribute(struct php_dom_libxml_ns_mapper *mapper, xmlNodePtr node, xmlNsPtr ns);

PHP_DOM_EXPORT bool php_dom_ns_is_fast(const xmlNode *nodep, const php_dom_ns_magic_token *magic_token);
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_fast(const xmlNode *nodep, const struct php_dom_ns_magic_token *magic_token);
PHP_DOM_EXPORT bool php_dom_ns_is_fast_ex(xmlNsPtr ns, const struct 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 {
Expand All @@ -65,7 +62,7 @@ typedef struct php_dom_in_scope_ns {
bool origin_is_ns_compat;
} php_dom_in_scope_ns;

PHP_DOM_EXPORT php_dom_in_scope_ns php_dom_get_in_scope_ns(php_dom_libxml_ns_mapper *ns_mapper, const xmlNode *node, bool ignore_elements);
PHP_DOM_EXPORT php_dom_in_scope_ns php_dom_get_in_scope_ns(struct php_dom_libxml_ns_mapper *ns_mapper, const xmlNode *node, bool ignore_elements);
PHP_DOM_EXPORT php_dom_in_scope_ns php_dom_get_in_scope_ns_legacy(const xmlNode *node);
PHP_DOM_EXPORT void php_dom_in_scope_ns_destroy(php_dom_in_scope_ns *in_scope_ns);

Expand Down
5 changes: 2 additions & 3 deletions ext/dom/php_dom.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ typedef enum dom_iterator_type {
} dom_iterator_type;

struct php_dom_libxml_ns_mapper;
typedef struct php_dom_libxml_ns_mapper php_dom_libxml_ns_mapper;

static inline dom_object_namespace_node *php_dom_namespace_node_obj_from_obj(zend_object *obj) {
return (dom_object_namespace_node*)((char*)(obj) - XtOffsetOf(dom_object_namespace_node, dom.std));
Expand Down Expand Up @@ -176,7 +175,7 @@ xmlDocPtr php_dom_create_html_doc(void);
xmlEntityPtr dom_entity_reference_fetch_and_sync_declaration(xmlNodePtr reference);
void dom_set_xml_class(php_libxml_ref_obj *document);
const char *dom_locate_a_namespace(const xmlNode *node, const zend_string *prefix);
void dom_mark_namespaces_as_attributes_too(php_dom_libxml_ns_mapper *ns_mapper, xmlDocPtr doc);
void dom_mark_namespaces_as_attributes_too(struct php_dom_libxml_ns_mapper *ns_mapper, xmlDocPtr doc);
bool dom_compare_value(const xmlAttr *attr, const xmlChar *value);
void dom_attr_value_will_change(dom_object *obj, xmlAttrPtr attrp);
bool php_dom_create_nullable_object(xmlNodePtr obj, zval *return_value, dom_object *domobj);
Expand Down Expand Up @@ -216,7 +215,7 @@ xmlNodePtr php_dom_named_node_map_get_item(dom_nnodemap_object *objmap, zend_lon
void php_dom_named_node_map_get_item_into_zval(dom_nnodemap_object *objmap, zend_long index, zval *return_value);
int php_dom_get_namednodemap_length(dom_object *obj);

xmlNodePtr dom_clone_node(php_dom_libxml_ns_mapper *ns_mapper, xmlNodePtr node, xmlDocPtr doc, bool recursive);
xmlNodePtr dom_clone_node(struct php_dom_libxml_ns_mapper *ns_mapper, xmlNodePtr node, xmlDocPtr doc, bool recursive);

#define DOM_GET_INTERN(__id, __intern) { \
__intern = Z_DOMOBJ_P(__id); \
Expand Down
Loading
Loading