1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

include: Readd circular dependency between tree.h and parser.h

There are dozens of downstream projects that only include tree.h but use
declarations from parser.h. This broke after the recent cleanup of
circular dependencies.

Make tree.h include parser.h again. This is a hack but doesn't change
the include directory struture.

This commit only made it into the 2.12 branch but wasn't applied to
master, so the issue turned up in 2.13.0 again.

Should fix #734.
This commit is contained in:
Nick Wellnhofer 2023-12-06 18:35:30 +01:00
parent bd208d5fe1
commit 387f0c784f
5 changed files with 19 additions and 0 deletions

View File

@ -12,7 +12,9 @@
#define __XML_ENTITIES_H__
#include <libxml/xmlversion.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
#ifdef __cplusplus
extern "C" {

View File

@ -11,7 +11,9 @@
#define __XML_PARSER_H__
#include <libxml/xmlversion.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
#include <libxml/dict.h>
#include <libxml/hash.h>
#include <libxml/valid.h>

View File

@ -9,6 +9,15 @@
* Author: Daniel Veillard
*/
#ifndef XML_TREE_INTERNALS
/*
* Emulate circular dependency for backward compatibility
*/
#include <libxml/parser.h>
#else /* XML_TREE_INTERNALS */
#ifndef __XML_TREE_H__
#define __XML_TREE_H__
@ -1374,3 +1383,5 @@ XML_DEPRECATED XMLPUBFUN int
#endif /* __XML_TREE_H__ */
#endif /* XML_TREE_INTERNALS */

View File

@ -13,7 +13,9 @@
#include <libxml/xmlversion.h>
#include <libxml/xmlerror.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
#include <libxml/list.h>
#include <libxml/xmlautomata.h>
#include <libxml/xmlregexp.h>

View File

@ -13,7 +13,9 @@
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/encoding.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
#ifdef __cplusplus
extern "C" {