Skip to content

Commit 68ea113

Browse files
committed
Deprecate KeepBlanks global in libxml 2.14.0+
1 parent c4c1275 commit 68ea113

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/xml6_gbl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,17 @@ DLLEXPORT void xml6_gbl_os_thread_set_tag_expansion(int flag) {
6767
}
6868

6969
DLLEXPORT int xml6_gbl_os_thread_get_keep_blanks(void) {
70+
#ifdef XML6_GBL_COMPAT_KEEP_BLANKS
7071
return xmlKeepBlanksDefaultValue;
72+
#else
73+
return -1;
74+
#endif
7175
}
7276

7377
DLLEXPORT void xml6_gbl_os_thread_set_keep_blanks(int flag) {
78+
#ifdef XML6_GBL_COMPAT_KEEP_BLANKS
7479
xmlKeepBlanksDefaultValue = flag;
80+
#endif
7581
}
7682

7783
DLLEXPORT void xml6_gbl_os_thread_xml_free(void* obj) {

src/xml6_gbl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
# define XML6_GBL_COMPAT_OLD_ERRORS 1
99
#endif
1010

11+
#if LIBXML_VERSION < 21400
12+
# define XML6_GBL_COMPAT_KEEP_BLANKS 1
13+
#endif
1114

1215
DLLEXPORT void xml6_gbl_init(void);
1316

0 commit comments

Comments
 (0)