nokogiri 1.15.4-arm64-darwin → 1.16.0.rc1-arm64-darwin
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +11 -14
- data/README.md +1 -1
- data/dependencies.yml +9 -8
- data/ext/nokogiri/extconf.rb +3 -4
- data/ext/nokogiri/html4_sax_push_parser.c +1 -1
- data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +23 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX.h +0 -2
- data/ext/nokogiri/include/libxml2/libxml/SAX2.h +0 -2
- data/ext/nokogiri/include/libxml2/libxml/c14n.h +0 -2
- data/ext/nokogiri/include/libxml2/libxml/dict.h +1 -0
- data/ext/nokogiri/include/libxml2/libxml/encoding.h +16 -14
- data/ext/nokogiri/include/libxml2/libxml/entities.h +4 -0
- data/ext/nokogiri/include/libxml2/libxml/globals.h +15 -503
- data/ext/nokogiri/include/libxml2/libxml/hash.h +57 -61
- data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +2 -2
- data/ext/nokogiri/include/libxml2/libxml/parser.h +128 -18
- data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +1 -0
- data/ext/nokogiri/include/libxml2/libxml/relaxng.h +2 -1
- data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +1 -0
- data/ext/nokogiri/include/libxml2/libxml/schematron.h +1 -0
- data/ext/nokogiri/include/libxml2/libxml/threads.h +4 -11
- data/ext/nokogiri/include/libxml2/libxml/tree.h +68 -20
- data/ext/nokogiri/include/libxml2/libxml/uri.h +2 -1
- data/ext/nokogiri/include/libxml2/libxml/valid.h +2 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +65 -12
- data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +37 -8
- data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +37 -40
- data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +6 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +2 -9
- data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +9 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +3 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +28 -43
- data/ext/nokogiri/include/libxml2/libxml/xpath.h +1 -1
- data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +2 -1
- data/ext/nokogiri/include/libxml2/libxml/xpointer.h +5 -4
- data/ext/nokogiri/include/libxslt/xsltconfig.h +4 -4
- data/ext/nokogiri/include/libxslt/xsltlocale.h +8 -0
- data/ext/nokogiri/nokogiri.h +10 -3
- data/ext/nokogiri/test_global_handlers.c +1 -1
- data/ext/nokogiri/xml_cdata.c +1 -2
- data/ext/nokogiri/xml_document.c +3 -3
- data/ext/nokogiri/xml_namespace.c +0 -4
- data/ext/nokogiri/xml_node.c +5 -8
- data/ext/nokogiri/xml_reader.c +1 -44
- data/ext/nokogiri/xml_relax_ng.c +1 -1
- data/ext/nokogiri/xml_sax_push_parser.c +1 -1
- data/ext/nokogiri/xml_schema.c +2 -3
- data/ext/nokogiri/xml_syntax_error.c +3 -3
- data/ext/nokogiri/xml_text.c +1 -2
- data/ext/nokogiri/xml_xpath_context.c +2 -5
- data/gumbo-parser/Makefile +15 -0
- data/lib/nokogiri/3.0/nokogiri.bundle +0 -0
- data/lib/nokogiri/3.1/nokogiri.bundle +0 -0
- data/lib/nokogiri/3.2/nokogiri.bundle +0 -0
- data/lib/nokogiri/{2.7 → 3.3}/nokogiri.bundle +0 -0
- data/lib/nokogiri/css/parser_extras.rb +1 -1
- data/lib/nokogiri/css/xpath_visitor.rb +1 -21
- data/lib/nokogiri/html4/document.rb +1 -1
- data/lib/nokogiri/html4/encoding_reader.rb +1 -1
- data/lib/nokogiri/html5.rb +0 -66
- data/lib/nokogiri/version/constant.rb +1 -1
- data/lib/nokogiri/version/info.rb +6 -5
- data/lib/nokogiri/xml/attr.rb +2 -2
- data/lib/nokogiri/xml/document.rb +4 -5
- data/lib/nokogiri/xml/document_fragment.rb +2 -2
- data/lib/nokogiri/xml/namespace.rb +1 -2
- data/lib/nokogiri/xml/node.rb +6 -5
- data/lib/nokogiri/xml/node_set.rb +3 -3
- data/lib/nokogiri/xml/searchable.rb +3 -3
- data/lib/nokogiri/xml/syntax_error.rb +1 -1
- data/lib/nokogiri/xml.rb +1 -1
- data/lib/nokogiri/xslt.rb +1 -1
- data/lib/nokogiri.rb +1 -1
- metadata +7 -7
@@ -9,6 +9,15 @@
|
|
9
9
|
* Author: Daniel Veillard
|
10
10
|
*/
|
11
11
|
|
12
|
+
#ifndef XML_TREE_INTERNALS
|
13
|
+
|
14
|
+
/*
|
15
|
+
* Emulate circular dependency for backward compatibility
|
16
|
+
*/
|
17
|
+
#include <libxml/parser.h>
|
18
|
+
|
19
|
+
#else /* XML_TREE_INTERNALS */
|
20
|
+
|
12
21
|
#ifndef __XML_TREE_H__
|
13
22
|
#define __XML_TREE_H__
|
14
23
|
|
@@ -16,6 +25,8 @@
|
|
16
25
|
#include <limits.h>
|
17
26
|
#include <libxml/xmlversion.h>
|
18
27
|
#include <libxml/xmlstring.h>
|
28
|
+
#include <libxml/xmlmemory.h>
|
29
|
+
#include <libxml/xmlregexp.h>
|
19
30
|
|
20
31
|
#ifdef __cplusplus
|
21
32
|
extern "C" {
|
@@ -329,14 +340,6 @@ typedef enum {
|
|
329
340
|
XML_ELEMENT_TYPE_ELEMENT
|
330
341
|
} xmlElementTypeVal;
|
331
342
|
|
332
|
-
#ifdef __cplusplus
|
333
|
-
}
|
334
|
-
#endif
|
335
|
-
#include <libxml/xmlregexp.h>
|
336
|
-
#ifdef __cplusplus
|
337
|
-
extern "C" {
|
338
|
-
#endif
|
339
|
-
|
340
343
|
/**
|
341
344
|
* xmlElement:
|
342
345
|
*
|
@@ -573,12 +576,11 @@ struct _xmlDoc {
|
|
573
576
|
struct _xmlDtd *extSubset; /* the document external subset */
|
574
577
|
struct _xmlNs *oldNs; /* Global namespace, the old way */
|
575
578
|
const xmlChar *version; /* the XML version string */
|
576
|
-
const xmlChar *encoding; /*
|
579
|
+
const xmlChar *encoding; /* actual encoding, if any */
|
577
580
|
void *ids; /* Hash table for ID attributes if any */
|
578
581
|
void *refs; /* Hash table for IDREFs attributes if any */
|
579
582
|
const xmlChar *URL; /* The URI for that document */
|
580
|
-
int charset; /*
|
581
|
-
actually an xmlCharEncoding */
|
583
|
+
int charset; /* unused */
|
582
584
|
struct _xmlDict *dict; /* dict used to allocate names or NULL */
|
583
585
|
void *psvi; /* for type/PSVI information */
|
584
586
|
int parseFlags; /* set of xmlParserOption used to parse the
|
@@ -630,6 +632,22 @@ struct _xmlDOMWrapCtxt {
|
|
630
632
|
xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
|
631
633
|
};
|
632
634
|
|
635
|
+
/**
|
636
|
+
* xmlRegisterNodeFunc:
|
637
|
+
* @node: the current node
|
638
|
+
*
|
639
|
+
* Signature for the registration callback of a created node
|
640
|
+
*/
|
641
|
+
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
|
642
|
+
|
643
|
+
/**
|
644
|
+
* xmlDeregisterNodeFunc:
|
645
|
+
* @node: the current node
|
646
|
+
*
|
647
|
+
* Signature for the deregistration callback of a discarded node
|
648
|
+
*/
|
649
|
+
typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
|
650
|
+
|
633
651
|
/**
|
634
652
|
* xmlChildrenNode:
|
635
653
|
*
|
@@ -654,18 +672,34 @@ struct _xmlDOMWrapCtxt {
|
|
654
672
|
* Variables.
|
655
673
|
*/
|
656
674
|
|
675
|
+
/** DOC_DISABLE */
|
676
|
+
#define XML_GLOBALS_TREE \
|
677
|
+
XML_OP(xmlBufferAllocScheme, xmlBufferAllocationScheme, XML_DEPRECATED) \
|
678
|
+
XML_OP(xmlDefaultBufferSize, int, XML_DEPRECATED) \
|
679
|
+
XML_OP(xmlRegisterNodeDefaultValue, xmlRegisterNodeFunc, XML_DEPRECATED) \
|
680
|
+
XML_OP(xmlDeregisterNodeDefaultValue, xmlDeregisterNodeFunc, \
|
681
|
+
XML_DEPRECATED)
|
682
|
+
|
683
|
+
#define XML_OP XML_DECLARE_GLOBAL
|
684
|
+
XML_GLOBALS_TREE
|
685
|
+
#undef XML_OP
|
686
|
+
|
687
|
+
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
688
|
+
#define xmlBufferAllocScheme XML_GLOBAL_MACRO(xmlBufferAllocScheme)
|
689
|
+
#define xmlDefaultBufferSize XML_GLOBAL_MACRO(xmlDefaultBufferSize)
|
690
|
+
#define xmlRegisterNodeDefaultValue \
|
691
|
+
XML_GLOBAL_MACRO(xmlRegisterNodeDefaultValue)
|
692
|
+
#define xmlDeregisterNodeDefaultValue \
|
693
|
+
XML_GLOBAL_MACRO(xmlDeregisterNodeDefaultValue)
|
694
|
+
#endif
|
695
|
+
/** DOC_ENABLE */
|
696
|
+
|
657
697
|
/*
|
658
698
|
* Some helper functions
|
659
699
|
*/
|
660
|
-
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
|
661
|
-
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \
|
662
|
-
defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \
|
663
|
-
defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \
|
664
|
-
defined(LIBXML_LEGACY_ENABLED)
|
665
700
|
XMLPUBFUN int
|
666
701
|
xmlValidateNCName (const xmlChar *value,
|
667
702
|
int space);
|
668
|
-
#endif
|
669
703
|
|
670
704
|
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
671
705
|
XMLPUBFUN int
|
@@ -1303,12 +1337,26 @@ XMLPUBFUN xmlNodePtr
|
|
1303
1337
|
XMLPUBFUN xmlNodePtr
|
1304
1338
|
xmlPreviousElementSibling (xmlNodePtr node);
|
1305
1339
|
#endif
|
1340
|
+
|
1341
|
+
XMLPUBFUN xmlRegisterNodeFunc
|
1342
|
+
xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
|
1343
|
+
XMLPUBFUN xmlDeregisterNodeFunc
|
1344
|
+
xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
|
1345
|
+
XMLPUBFUN xmlRegisterNodeFunc
|
1346
|
+
xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
|
1347
|
+
XMLPUBFUN xmlDeregisterNodeFunc
|
1348
|
+
xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
1349
|
+
|
1350
|
+
XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme
|
1351
|
+
xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v);
|
1352
|
+
XML_DEPRECATED XMLPUBFUN int
|
1353
|
+
xmlThrDefDefaultBufferSize (int v);
|
1354
|
+
|
1306
1355
|
#ifdef __cplusplus
|
1307
1356
|
}
|
1308
1357
|
#endif
|
1309
|
-
#ifndef __XML_PARSER_H__
|
1310
|
-
#include <libxml/xmlmemory.h>
|
1311
|
-
#endif
|
1312
1358
|
|
1313
1359
|
#endif /* __XML_TREE_H__ */
|
1314
1360
|
|
1361
|
+
#endif /* XML_TREE_INTERNALS */
|
1362
|
+
|
@@ -12,6 +12,10 @@
|
|
12
12
|
|
13
13
|
#include <stdio.h>
|
14
14
|
#include <libxml/xmlversion.h>
|
15
|
+
#include <libxml/encoding.h>
|
16
|
+
#define XML_TREE_INTERNALS
|
17
|
+
#include <libxml/tree.h>
|
18
|
+
#undef XML_TREE_INTERNALS
|
15
19
|
|
16
20
|
#ifdef __cplusplus
|
17
21
|
extern "C" {
|
@@ -110,18 +114,35 @@ typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
|
|
110
114
|
typedef int (*xmlOutputCloseCallback) (void * context);
|
111
115
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
112
116
|
|
113
|
-
|
114
|
-
|
115
|
-
|
117
|
+
/**
|
118
|
+
* xmlParserInputBufferCreateFilenameFunc:
|
119
|
+
* @URI: the URI to read from
|
120
|
+
* @enc: the requested source encoding
|
121
|
+
*
|
122
|
+
* Signature for the function doing the lookup for a suitable input method
|
123
|
+
* corresponding to an URI.
|
124
|
+
*
|
125
|
+
* Returns the new xmlParserInputBufferPtr in case of success or NULL if no
|
126
|
+
* method was found.
|
127
|
+
*/
|
128
|
+
typedef xmlParserInputBufferPtr
|
129
|
+
(*xmlParserInputBufferCreateFilenameFunc)(const char *URI, xmlCharEncoding enc);
|
116
130
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
131
|
+
/**
|
132
|
+
* xmlOutputBufferCreateFilenameFunc:
|
133
|
+
* @URI: the URI to write to
|
134
|
+
* @enc: the requested target encoding
|
135
|
+
*
|
136
|
+
* Signature for the function doing the lookup for a suitable output method
|
137
|
+
* corresponding to an URI.
|
138
|
+
*
|
139
|
+
* Returns the new xmlOutputBufferPtr in case of success or NULL if no
|
140
|
+
* method was found.
|
141
|
+
*/
|
142
|
+
typedef xmlOutputBufferPtr
|
143
|
+
(*xmlOutputBufferCreateFilenameFunc)(const char *URI,
|
144
|
+
xmlCharEncodingHandlerPtr encoder, int compression);
|
121
145
|
|
122
|
-
#ifdef __cplusplus
|
123
|
-
extern "C" {
|
124
|
-
#endif
|
125
146
|
struct _xmlParserInputBuffer {
|
126
147
|
void* context;
|
127
148
|
xmlInputReadCallback readcallback;
|
@@ -152,6 +173,25 @@ struct _xmlOutputBuffer {
|
|
152
173
|
};
|
153
174
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
154
175
|
|
176
|
+
/** DOC_DISABLE */
|
177
|
+
#define XML_GLOBALS_IO \
|
178
|
+
XML_OP(xmlParserInputBufferCreateFilenameValue, \
|
179
|
+
xmlParserInputBufferCreateFilenameFunc, XML_DEPRECATED) \
|
180
|
+
XML_OP(xmlOutputBufferCreateFilenameValue, \
|
181
|
+
xmlOutputBufferCreateFilenameFunc, XML_DEPRECATED)
|
182
|
+
|
183
|
+
#define XML_OP XML_DECLARE_GLOBAL
|
184
|
+
XML_GLOBALS_IO
|
185
|
+
#undef XML_OP
|
186
|
+
|
187
|
+
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
188
|
+
#define xmlParserInputBufferCreateFilenameValue \
|
189
|
+
XML_GLOBAL_MACRO(xmlParserInputBufferCreateFilenameValue)
|
190
|
+
#define xmlOutputBufferCreateFilenameValue \
|
191
|
+
XML_GLOBAL_MACRO(xmlOutputBufferCreateFilenameValue)
|
192
|
+
#endif
|
193
|
+
/** DOC_ENABLE */
|
194
|
+
|
155
195
|
/*
|
156
196
|
* Interfaces for input
|
157
197
|
*/
|
@@ -349,7 +389,7 @@ XMLPUBFUN int
|
|
349
389
|
/**
|
350
390
|
* Default 'ftp://' protocol callbacks
|
351
391
|
*/
|
352
|
-
#
|
392
|
+
#if defined(LIBXML_FTP_ENABLED)
|
353
393
|
XMLPUBFUN int
|
354
394
|
xmlIOFTPMatch (const char *filename);
|
355
395
|
XMLPUBFUN void *
|
@@ -360,7 +400,20 @@ XMLPUBFUN int
|
|
360
400
|
int len);
|
361
401
|
XMLPUBFUN int
|
362
402
|
xmlIOFTPClose (void * context);
|
363
|
-
#endif /* LIBXML_FTP_ENABLED */
|
403
|
+
#endif /* defined(LIBXML_FTP_ENABLED) */
|
404
|
+
|
405
|
+
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
406
|
+
xmlParserInputBufferCreateFilenameDefault(
|
407
|
+
xmlParserInputBufferCreateFilenameFunc func);
|
408
|
+
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
|
409
|
+
xmlOutputBufferCreateFilenameDefault(
|
410
|
+
xmlOutputBufferCreateFilenameFunc func);
|
411
|
+
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
|
412
|
+
xmlThrDefOutputBufferCreateFilenameDefault(
|
413
|
+
xmlOutputBufferCreateFilenameFunc func);
|
414
|
+
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
415
|
+
xmlThrDefParserInputBufferCreateFilenameDefault(
|
416
|
+
xmlParserInputBufferCreateFilenameFunc func);
|
364
417
|
|
365
418
|
#ifdef __cplusplus
|
366
419
|
}
|
@@ -7,11 +7,11 @@
|
|
7
7
|
* Author: Daniel Veillard
|
8
8
|
*/
|
9
9
|
|
10
|
-
#include <libxml/parser.h>
|
11
|
-
|
12
10
|
#ifndef __XML_ERROR_H__
|
13
11
|
#define __XML_ERROR_H__
|
14
12
|
|
13
|
+
#include <libxml/xmlversion.h>
|
14
|
+
|
15
15
|
#ifdef __cplusplus
|
16
16
|
extern "C" {
|
17
17
|
#endif
|
@@ -210,6 +210,7 @@ typedef enum {
|
|
210
210
|
XML_ERR_NAME_TOO_LONG, /* 110 */
|
211
211
|
XML_ERR_USER_STOP, /* 111 */
|
212
212
|
XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */
|
213
|
+
XML_WAR_ENCODING_MISMATCH, /* 113 */
|
213
214
|
XML_NS_ERR_XML_NAMESPACE = 200,
|
214
215
|
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
|
215
216
|
XML_NS_ERR_QNAME, /* 202 */
|
@@ -855,7 +856,28 @@ typedef void (*xmlGenericErrorFunc) (void *ctx,
|
|
855
856
|
* Signature of the function to use when there is an error and
|
856
857
|
* the module handles the new error reporting mechanism.
|
857
858
|
*/
|
858
|
-
typedef void (*xmlStructuredErrorFunc) (void *userData,
|
859
|
+
typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
|
860
|
+
|
861
|
+
/** DOC_DISABLE */
|
862
|
+
#define XML_GLOBALS_ERROR \
|
863
|
+
XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \
|
864
|
+
XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_NO_ATTR) \
|
865
|
+
XML_OP(xmlGenericErrorContext, void *, XML_NO_ATTR) \
|
866
|
+
XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_NO_ATTR) \
|
867
|
+
XML_OP(xmlStructuredErrorContext, void *, XML_NO_ATTR)
|
868
|
+
|
869
|
+
#define XML_OP XML_DECLARE_GLOBAL
|
870
|
+
XML_GLOBALS_ERROR
|
871
|
+
#undef XML_OP
|
872
|
+
|
873
|
+
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
874
|
+
#define xmlLastError XML_GLOBAL_MACRO(xmlLastError)
|
875
|
+
#define xmlGenericError XML_GLOBAL_MACRO(xmlGenericError)
|
876
|
+
#define xmlGenericErrorContext XML_GLOBAL_MACRO(xmlGenericErrorContext)
|
877
|
+
#define xmlStructuredError XML_GLOBAL_MACRO(xmlStructuredError)
|
878
|
+
#define xmlStructuredErrorContext XML_GLOBAL_MACRO(xmlStructuredErrorContext)
|
879
|
+
#endif
|
880
|
+
/** DOC_ENABLE */
|
859
881
|
|
860
882
|
/*
|
861
883
|
* Use the following function to reset the two global variables
|
@@ -864,6 +886,9 @@ typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
|
|
864
886
|
XMLPUBFUN void
|
865
887
|
xmlSetGenericErrorFunc (void *ctx,
|
866
888
|
xmlGenericErrorFunc handler);
|
889
|
+
XMLPUBFUN void
|
890
|
+
xmlThrDefSetGenericErrorFunc(void *ctx,
|
891
|
+
xmlGenericErrorFunc handler);
|
867
892
|
XML_DEPRECATED
|
868
893
|
XMLPUBFUN void
|
869
894
|
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
|
@@ -871,6 +896,9 @@ XMLPUBFUN void
|
|
871
896
|
XMLPUBFUN void
|
872
897
|
xmlSetStructuredErrorFunc (void *ctx,
|
873
898
|
xmlStructuredErrorFunc handler);
|
899
|
+
XMLPUBFUN void
|
900
|
+
xmlThrDefSetStructuredErrorFunc(void *ctx,
|
901
|
+
xmlStructuredErrorFunc handler);
|
874
902
|
/*
|
875
903
|
* Default message routines used by SAX and Valid context for error
|
876
904
|
* and warning reporting.
|
@@ -891,26 +919,27 @@ XMLPUBFUN void
|
|
891
919
|
xmlParserValidityWarning (void *ctx,
|
892
920
|
const char *msg,
|
893
921
|
...) LIBXML_ATTR_FORMAT(2,3);
|
922
|
+
struct _xmlParserInput;
|
894
923
|
XMLPUBFUN void
|
895
|
-
xmlParserPrintFileInfo (
|
924
|
+
xmlParserPrintFileInfo (struct _xmlParserInput *input);
|
896
925
|
XMLPUBFUN void
|
897
|
-
xmlParserPrintFileContext (
|
926
|
+
xmlParserPrintFileContext (struct _xmlParserInput *input);
|
898
927
|
|
899
928
|
/*
|
900
929
|
* Extended error information routines
|
901
930
|
*/
|
902
|
-
XMLPUBFUN
|
931
|
+
XMLPUBFUN const xmlError *
|
903
932
|
xmlGetLastError (void);
|
904
933
|
XMLPUBFUN void
|
905
934
|
xmlResetLastError (void);
|
906
|
-
XMLPUBFUN
|
935
|
+
XMLPUBFUN const xmlError *
|
907
936
|
xmlCtxtGetLastError (void *ctx);
|
908
937
|
XMLPUBFUN void
|
909
938
|
xmlCtxtResetLastError (void *ctx);
|
910
939
|
XMLPUBFUN void
|
911
940
|
xmlResetError (xmlErrorPtr err);
|
912
941
|
XMLPUBFUN int
|
913
|
-
xmlCopyError (
|
942
|
+
xmlCopyError (const xmlError *from,
|
914
943
|
xmlErrorPtr to);
|
915
944
|
|
916
945
|
#ifdef __cplusplus
|
@@ -15,32 +15,6 @@
|
|
15
15
|
#include <stdio.h>
|
16
16
|
#include <libxml/xmlversion.h>
|
17
17
|
|
18
|
-
/**
|
19
|
-
* DEBUG_MEMORY:
|
20
|
-
*
|
21
|
-
* DEBUG_MEMORY replaces the allocator with a collect and debug
|
22
|
-
* shell to the libc allocator.
|
23
|
-
* DEBUG_MEMORY should only be activated when debugging
|
24
|
-
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
25
|
-
*/
|
26
|
-
/* #define DEBUG_MEMORY_FREED */
|
27
|
-
/* #define DEBUG_MEMORY_LOCATION */
|
28
|
-
|
29
|
-
#ifdef DEBUG
|
30
|
-
#ifndef DEBUG_MEMORY
|
31
|
-
#define DEBUG_MEMORY
|
32
|
-
#endif
|
33
|
-
#endif
|
34
|
-
|
35
|
-
/**
|
36
|
-
* DEBUG_MEMORY_LOCATION:
|
37
|
-
*
|
38
|
-
* DEBUG_MEMORY_LOCATION should be activated only when debugging
|
39
|
-
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
40
|
-
*/
|
41
|
-
#ifdef DEBUG_MEMORY_LOCATION
|
42
|
-
#endif
|
43
|
-
|
44
18
|
#ifdef __cplusplus
|
45
19
|
extern "C" {
|
46
20
|
#endif
|
@@ -87,13 +61,41 @@ typedef void *(*xmlReallocFunc)(void *mem, size_t size);
|
|
87
61
|
typedef char *(*xmlStrdupFunc)(const char *str);
|
88
62
|
|
89
63
|
/*
|
90
|
-
*
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
64
|
+
* In general the memory allocation entry points are not kept
|
65
|
+
* thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
|
66
|
+
* - xmlMalloc
|
67
|
+
* - xmlMallocAtomic
|
68
|
+
* - xmlRealloc
|
69
|
+
* - xmlMemStrdup
|
70
|
+
* - xmlFree
|
71
|
+
*/
|
72
|
+
/** DOC_DISABLE */
|
73
|
+
#ifdef LIBXML_THREAD_ALLOC_ENABLED
|
74
|
+
#define XML_GLOBALS_ALLOC \
|
75
|
+
XML_OP(xmlMalloc, xmlMallocFunc, XML_NO_ATTR) \
|
76
|
+
XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_NO_ATTR) \
|
77
|
+
XML_OP(xmlRealloc, xmlReallocFunc, XML_NO_ATTR) \
|
78
|
+
XML_OP(xmlFree, xmlFreeFunc, XML_NO_ATTR) \
|
79
|
+
XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_NO_ATTR)
|
80
|
+
#define XML_OP XML_DECLARE_GLOBAL
|
81
|
+
XML_GLOBALS_ALLOC
|
82
|
+
#undef XML_OP
|
83
|
+
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
84
|
+
#define xmlMalloc XML_GLOBAL_MACRO(xmlMalloc)
|
85
|
+
#define xmlMallocAtomic XML_GLOBAL_MACRO(xmlMallocAtomic)
|
86
|
+
#define xmlRealloc XML_GLOBAL_MACRO(xmlRealloc)
|
87
|
+
#define xmlFree XML_GLOBAL_MACRO(xmlFree)
|
88
|
+
#define xmlMemStrdup XML_GLOBAL_MACRO(xmlMemStrdup)
|
89
|
+
#endif
|
90
|
+
#else
|
91
|
+
#define XML_GLOBALS_ALLOC
|
92
|
+
/** DOC_ENABLE */
|
93
|
+
XMLPUBVAR xmlMallocFunc xmlMalloc;
|
94
|
+
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
|
95
|
+
XMLPUBVAR xmlReallocFunc xmlRealloc;
|
96
|
+
XMLPUBVAR xmlFreeFunc xmlFree;
|
97
|
+
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
|
98
|
+
#endif
|
97
99
|
|
98
100
|
/*
|
99
101
|
* The way to overload the existing functions.
|
@@ -171,6 +173,7 @@ XMLPUBFUN char *
|
|
171
173
|
xmlMemStrdupLoc (const char *str, const char *file, int line);
|
172
174
|
|
173
175
|
|
176
|
+
/** DOC_DISABLE */
|
174
177
|
#ifdef DEBUG_MEMORY_LOCATION
|
175
178
|
/**
|
176
179
|
* xmlMalloc:
|
@@ -212,17 +215,11 @@ XMLPUBFUN char *
|
|
212
215
|
#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
|
213
216
|
|
214
217
|
#endif /* DEBUG_MEMORY_LOCATION */
|
218
|
+
/** DOC_ENABLE */
|
215
219
|
|
216
220
|
#ifdef __cplusplus
|
217
221
|
}
|
218
222
|
#endif /* __cplusplus */
|
219
223
|
|
220
|
-
#ifndef __XML_GLOBALS_H
|
221
|
-
#ifndef __XML_THREADS_H__
|
222
|
-
#include <libxml/threads.h>
|
223
|
-
#include <libxml/globals.h>
|
224
|
-
#endif
|
225
|
-
#endif
|
226
|
-
|
227
224
|
#endif /* __DEBUG_MEMORY_ALLOC__ */
|
228
225
|
|
@@ -12,11 +12,14 @@
|
|
12
12
|
|
13
13
|
#include <libxml/xmlversion.h>
|
14
14
|
#include <libxml/tree.h>
|
15
|
+
#include <libxml/xmlerror.h>
|
15
16
|
#include <libxml/xmlIO.h>
|
16
17
|
#ifdef LIBXML_SCHEMAS_ENABLED
|
17
18
|
#include <libxml/relaxng.h>
|
18
19
|
#include <libxml/xmlschemas.h>
|
19
20
|
#endif
|
21
|
+
/* for compatibility */
|
22
|
+
#include <libxml/parser.h>
|
20
23
|
|
21
24
|
#ifdef __cplusplus
|
22
25
|
extern "C" {
|
@@ -121,6 +124,9 @@ XMLPUBFUN int
|
|
121
124
|
xmlTextReaderSetup(xmlTextReaderPtr reader,
|
122
125
|
xmlParserInputBufferPtr input, const char *URL,
|
123
126
|
const char *encoding, int options);
|
127
|
+
XMLPUBFUN void
|
128
|
+
xmlTextReaderSetMaxAmplification(xmlTextReaderPtr reader,
|
129
|
+
unsigned maxAmpl);
|
124
130
|
|
125
131
|
/*
|
126
132
|
* Iterators
|
@@ -11,7 +11,9 @@
|
|
11
11
|
#ifndef __XML_REGEXP_H__
|
12
12
|
#define __XML_REGEXP_H__
|
13
13
|
|
14
|
+
#include <stdio.h>
|
14
15
|
#include <libxml/xmlversion.h>
|
16
|
+
#include <libxml/xmlstring.h>
|
15
17
|
|
16
18
|
#ifdef LIBXML_REGEXP_ENABLED
|
17
19
|
|
@@ -36,15 +38,6 @@ typedef xmlRegexp *xmlRegexpPtr;
|
|
36
38
|
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
|
37
39
|
typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
|
38
40
|
|
39
|
-
#ifdef __cplusplus
|
40
|
-
}
|
41
|
-
#endif
|
42
|
-
#include <libxml/tree.h>
|
43
|
-
#include <libxml/dict.h>
|
44
|
-
#ifdef __cplusplus
|
45
|
-
extern "C" {
|
46
|
-
#endif
|
47
|
-
|
48
41
|
/*
|
49
42
|
* The POSIX like API
|
50
43
|
*/
|
@@ -79,9 +79,18 @@ XMLPUBFUN int
|
|
79
79
|
XMLPUBFUN int
|
80
80
|
xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
|
81
81
|
xmlCharEncodingOutputFunc escape);
|
82
|
+
|
83
|
+
XMLPUBFUN int
|
84
|
+
xmlThrDefIndentTreeOutput(int v);
|
85
|
+
XMLPUBFUN const char *
|
86
|
+
xmlThrDefTreeIndentString(const char * v);
|
87
|
+
XMLPUBFUN int
|
88
|
+
xmlThrDefSaveNoEmptyTags(int v);
|
89
|
+
|
82
90
|
#ifdef __cplusplus
|
83
91
|
}
|
84
92
|
#endif
|
93
|
+
|
85
94
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
86
95
|
#endif /* __XML_XMLSAVE_H__ */
|
87
96
|
|