libxml-ruby 3.2.3-x64-mingw-ucrt → 4.0.0-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/HISTORY +10 -0
  3. data/ext/libxml/extconf.h +3 -0
  4. data/ext/libxml/libxml.c +0 -1
  5. data/ext/libxml/libxml_ruby.def +0 -1
  6. data/ext/libxml/ruby_libxml.h +0 -23
  7. data/ext/libxml/ruby_xml.c +3 -1
  8. data/ext/libxml/ruby_xml.h +1 -1
  9. data/ext/libxml/ruby_xml_cbg.c +1 -1
  10. data/ext/libxml/ruby_xml_document.c +6 -0
  11. data/ext/libxml/ruby_xml_dtd.c +1 -1
  12. data/ext/libxml/ruby_xml_encoding.c +1 -1
  13. data/ext/libxml/ruby_xml_encoding.h +2 -0
  14. data/ext/libxml/ruby_xml_error.c +2 -2
  15. data/ext/libxml/ruby_xml_error.h +3 -1
  16. data/ext/libxml/ruby_xml_html_parser.c +2 -0
  17. data/ext/libxml/ruby_xml_html_parser_context.c +1 -0
  18. data/ext/libxml/ruby_xml_html_parser_options.c +2 -0
  19. data/ext/libxml/ruby_xml_input_cbg.c +1 -1
  20. data/ext/libxml/ruby_xml_io.c +1 -1
  21. data/ext/libxml/ruby_xml_node.c +4 -12
  22. data/ext/libxml/ruby_xml_parser_context.c +2 -0
  23. data/ext/libxml/ruby_xml_reader.c +3 -0
  24. data/ext/libxml/ruby_xml_reader.h +0 -3
  25. data/ext/libxml/ruby_xml_relaxng.c +2 -0
  26. data/ext/libxml/ruby_xml_relaxng.h +0 -2
  27. data/ext/libxml/ruby_xml_schema.c +72 -2
  28. data/ext/libxml/ruby_xml_schema.h +4 -785
  29. data/ext/libxml/ruby_xml_schema_attribute.c +46 -0
  30. data/ext/libxml/ruby_xml_schema_attribute.h +25 -3
  31. data/ext/libxml/ruby_xml_schema_element.h +0 -3
  32. data/ext/libxml/ruby_xml_schema_facet.c +4 -0
  33. data/ext/libxml/ruby_xml_schema_facet.h +0 -4
  34. data/ext/libxml/ruby_xml_schema_type.c +37 -0
  35. data/ext/libxml/ruby_xml_version.h +5 -5
  36. data/ext/libxml/ruby_xml_writer.c +4 -0
  37. data/ext/libxml/ruby_xml_writer.h +0 -4
  38. data/ext/libxml/ruby_xml_xinclude.c +4 -0
  39. data/ext/libxml/ruby_xml_xpath.c +1 -0
  40. data/ext/libxml/ruby_xml_xpath.h +2 -0
  41. data/ext/libxml/ruby_xml_xpath_context.c +2 -0
  42. data/ext/libxml/ruby_xml_xpath_object.c +1 -0
  43. data/lib/{3.0 → 3.1}/libxml_ruby.so +0 -0
  44. data/lib/3.2/libxml_ruby.so +0 -0
  45. data/test/test_helper.rb +4 -0
  46. data/test/test_xml.rb +15 -3
  47. metadata +6 -12
  48. data/MANIFEST +0 -166
  49. data/ext/libxml/ruby_xml_xpointer.c +0 -99
  50. data/ext/libxml/ruby_xml_xpointer.h +0 -11
  51. data/setup.rb +0 -1584
  52. data/test/test_suite.rb +0 -48
  53. data/test/test_xpointer.rb +0 -72
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9799bff3bd887553e6882fb39836631745e457c9a6bfecd04e17bfa06c7a8d76
4
- data.tar.gz: 2869f54529062336d64ceb53e78f8771eecfafe6e6caf83bb8c648a85628944e
3
+ metadata.gz: 15167370942fc862a4602c9bfc1fd35f46562cad3a43093ac5249d679791fb69
4
+ data.tar.gz: d4f29d60c2d528405b520f68c4c47b60f6dbd42276571d7044835395b7499d29
5
5
  SHA512:
6
- metadata.gz: f5e8c1ad556b60a29f94a384bca45069ef5e12c677cd84cc9d158d4fb1690e89aaf583a3ce52e79a99e2a53f14be43b5a1fa99931a267c838be9b23b2a2f11a2
7
- data.tar.gz: 64bca753b8cae3ffb7e4a38160e0ebc83a6e0c826f741baf11ea6de51efc94a6057ed1ed7487e7bdee2ee9f11a38644b476c4c9d0855b134d9d50eba6dddda47
6
+ metadata.gz: b991a82a321d37111acf48e9115c8feb87d2481cd6a4fbdf52d769020b5585d6bfa60bcc5aa09358726ce1172622d53e861dc36f29da91fe0c2d709b26dd17e1
7
+ data.tar.gz: 7f9f1b54201198b74590d39544cf330939aa930021281a73dd85a20d56088dc2926a40a67bffb0dc52f0d3768d888552574f41ec2b51f13f2a2acfee8ad774b5
data/HISTORY CHANGED
@@ -1,5 +1,15 @@
1
1
  = Release History
2
2
 
3
+ == 4.0.0 / 2022-12-28
4
+
5
+ * Breaking - Remove support for XPointer since libxml2 has deprecated it and will remove it (Charlie Savage)
6
+ * Breaking - Remove support for ancient setup.rb script (Charlie Savage)
7
+
8
+ == 3.2.4 / 2022-10-29
9
+
10
+ * Support libxml2 version 2.10.2 (Charlie Savage)
11
+ * Reduce number of globally included C header files (Charlie Savage)
12
+
3
13
  == 3.2.3 / 2022-05-22
4
14
 
5
15
  * Change some getter methods to instance variables with attr_accessors for easier debuggability (David Hansen)
@@ -0,0 +1,3 @@
1
+ #ifndef EXTCONF_H
2
+ #define EXTCONF_H
3
+ #endif
data/ext/libxml/libxml.c CHANGED
@@ -67,7 +67,6 @@ void Init_libxml_ruby(void)
67
67
  rxml_init_xpath_object();
68
68
  rxml_init_xpath_context();
69
69
  rxml_init_xpath_expression();
70
- rxml_init_xpointer();
71
70
  rxml_init_html_parser();
72
71
  rxml_init_html_parser_options();
73
72
  rxml_init_html_parser_context();
@@ -25,7 +25,6 @@ cXMLXInclude DATA
25
25
  cXMLXPathContext DATA
26
26
  cXMLXPathExpression DATA
27
27
  cXMLXPathObject DATA
28
- cXMLXPointer DATA
29
28
  eXMLError DATA
30
29
  mLibXML DATA
31
30
  mXML DATA
@@ -4,29 +4,7 @@
4
4
  #define __RUBY_LIBXML_H__
5
5
 
6
6
  #include <ruby.h>
7
- #include <libxml/parser.h>
8
- #include <libxml/parserInternals.h>
9
- #include <libxml/debugXML.h>
10
7
  #include <libxml/xmlversion.h>
11
- #include <libxml/xmlmemory.h>
12
- #include <libxml/xpath.h>
13
- #include <libxml/valid.h>
14
- #include <libxml/catalog.h>
15
- #include <libxml/HTMLparser.h>
16
- #include <libxml/xmlreader.h>
17
- #include <libxml/c14n.h>
18
-
19
- #include <ruby/encoding.h>
20
-
21
- #ifdef LIBXML_DEBUG_ENABLED
22
- #include <libxml/xpathInternals.h>
23
- #endif
24
- #ifdef LIBXML_XINCLUDE_ENABLED
25
- #include <libxml/xinclude.h>
26
- #endif
27
- #ifdef LIBXML_XPTR_ENABLED
28
- #include <libxml/xpointer.h>
29
- #endif
30
8
 
31
9
  #include "ruby_xml_version.h"
32
10
  #include "ruby_xml.h"
@@ -56,7 +34,6 @@
56
34
  #include "ruby_xml_xpath_expression.h"
57
35
  #include "ruby_xml_xpath_context.h"
58
36
  #include "ruby_xml_xpath_object.h"
59
- #include "ruby_xml_xpointer.h"
60
37
  #include "ruby_xml_input_cbg.h"
61
38
  #include "ruby_xml_dtd.h"
62
39
  #include "ruby_xml_schema.h"
@@ -1,6 +1,8 @@
1
1
  #include "ruby_libxml.h"
2
2
  #include "ruby_xml.h"
3
3
 
4
+ #include <libxml/catalog.h>
5
+
4
6
  VALUE mXML;
5
7
 
6
8
  /*
@@ -477,7 +479,7 @@ static VALUE rxml_default_line_numbers_set(VALUE klass, VALUE value)
477
479
  }
478
480
  }
479
481
 
480
- int rxml_libxml_default_options()
482
+ int rxml_libxml_default_options(void)
481
483
  {
482
484
  int options = 0;
483
485
 
@@ -4,7 +4,7 @@
4
4
  #define __RUBY_XML_H__
5
5
 
6
6
  extern VALUE mXML;
7
- int rxml_libxml_default_options();
7
+ int rxml_libxml_default_options(void);
8
8
  void rxml_init_xml(void);
9
9
 
10
10
  #endif
@@ -79,7 +79,7 @@ int deb_Close(void *context)
79
79
  return 1;
80
80
  }
81
81
 
82
- void deb_register_cbg()
82
+ void deb_register_cbg(void)
83
83
  {
84
84
  xmlRegisterInputCallbacks(deb_Match, deb_Open, deb_Read, deb_Close);
85
85
  }
@@ -52,6 +52,12 @@
52
52
  #include "ruby_libxml.h"
53
53
  #include "ruby_xml_document.h"
54
54
 
55
+ #include <libxml/c14n.h>
56
+ #include <libxml/debugXML.h>
57
+ #include <libxml/relaxng.h>
58
+ #include <libxml/xmlschemas.h>
59
+ #include <libxml/xinclude.h>
60
+
55
61
  VALUE cXMLDocument;
56
62
 
57
63
  void rxml_document_free(xmlDocPtr xdoc)
@@ -235,7 +235,7 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self)
235
235
  return self;
236
236
  }
237
237
 
238
- void rxml_init_dtd()
238
+ void rxml_init_dtd(void)
239
239
  {
240
240
  cXMLDtd = rb_define_class_under(mXML, "Dtd", rb_cObject);
241
241
  rb_define_alloc_func(cXMLDtd, rxml_dtd_alloc);
@@ -182,7 +182,7 @@ rb_encoding* rxml_figure_encoding(const xmlChar* xencoding)
182
182
  VALUE rxml_new_cstr(const xmlChar* xstr, const xmlChar* xencoding)
183
183
  {
184
184
  rb_encoding *rbencoding = rxml_figure_encoding(xencoding);
185
- return rb_external_str_new_with_enc((const char*)xstr, strlen((const char*)xstr), rbencoding);
185
+ return rb_external_str_new_with_enc((const char*)xstr, (long)strlen((const char*)xstr), rbencoding);
186
186
  }
187
187
 
188
188
  VALUE rxml_new_cstr_len(const xmlChar* xstr, const long length, const xmlChar* xencoding)
@@ -3,6 +3,8 @@
3
3
  #ifndef __RXML_ENCODING__
4
4
  #define __RXML_ENCODING__
5
5
 
6
+ #include <ruby/encoding.h>
7
+
6
8
  extern VALUE mXMLEncoding;
7
9
 
8
10
  void rxml_init_encoding();
@@ -44,7 +44,7 @@ static ID ERROR_HANDLER_ID;
44
44
  * Returns the proc that will be called when libxml generates
45
45
  * warning, error or fatal error messages.
46
46
  */
47
- static VALUE rxml_error_get_handler()
47
+ static VALUE rxml_error_get_handler(void)
48
48
  {
49
49
  VALUE block = rb_cvar_get(eXMLError, ERROR_HANDLER_ID);
50
50
  return block;
@@ -165,7 +165,7 @@ NORETURN(void rxml_raise(xmlErrorPtr xerror))
165
165
  rb_exc_raise(error);
166
166
  }
167
167
 
168
- void rxml_init_error()
168
+ void rxml_init_error(void)
169
169
  {
170
170
  CALL_METHOD = rb_intern("call");
171
171
  ERROR_HANDLER_ID = rb_intern("@@__error_handler_callback__");
@@ -3,9 +3,11 @@
3
3
  #ifndef __RXML_ERROR__
4
4
  #define __RXML_ERROR__
5
5
 
6
+ #include <libxml/xmlerror.h>
7
+
6
8
  extern VALUE eXMLError;
7
9
 
8
- void rxml_init_error();
10
+ void rxml_init_error(void);
9
11
  VALUE rxml_error_wrap(xmlErrorPtr xerror);
10
12
  NORETURN(void rxml_raise(xmlErrorPtr xerror));
11
13
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  #include "ruby_libxml.h"
4
4
 
5
+ #include <libxml/HTMLparser.h>
6
+
5
7
  /* Document-class: LibXML::XML::HTMLParser
6
8
  *
7
9
  * The HTML parser implements an HTML 4.0 non-verifying parser with an API
@@ -3,6 +3,7 @@
3
3
  #include "ruby_libxml.h"
4
4
  #include "ruby_xml_html_parser_context.h"
5
5
 
6
+ #include <libxml/parserInternals.h>
6
7
 
7
8
  /*
8
9
  * Document-class: LibXML::XML::HTMLParser::Context
@@ -2,6 +2,8 @@
2
2
 
3
3
  #include "ruby_libxml.h"
4
4
 
5
+ #include <libxml/HTMLparser.h>
6
+
5
7
  /* Document-class: LibXML::XML::HTMLParser::Options
6
8
  *
7
9
  * Options to control the operation of the HTMLParser. The easiest
@@ -88,7 +88,7 @@ int ic_close(void *context)
88
88
  *
89
89
  * Register a new set of I/O callback for handling parser input.
90
90
  */
91
- static VALUE input_callbacks_register_input_callbacks()
91
+ static VALUE input_callbacks_register_input_callbacks(void)
92
92
  {
93
93
  xmlRegisterInputCallbacks(ic_match, ic_open, ic_read, ic_close);
94
94
  return (Qtrue);
@@ -30,7 +30,7 @@ int rxml_write_callback(VALUE io, const char *buffer, int len)
30
30
  {
31
31
  // Could be StringIO
32
32
  VALUE written, string;
33
- string = rb_external_str_new_with_enc(buffer, strlen(buffer), rb_enc_get(io));
33
+ string = rb_external_str_new_with_enc(buffer, (long)strlen(buffer), rb_enc_get(io));
34
34
  written = rb_funcall(io, WRITE_METHOD, 1, string);
35
35
  return NUM2INT(written);
36
36
  }
@@ -2,6 +2,10 @@
2
2
  #include "ruby_xml_node.h"
3
3
  #include <assert.h>
4
4
 
5
+ #include <libxml/debugXML.h>
6
+ #include <libxml/parserInternals.h>
7
+ #include <libxml/xlink.h>
8
+
5
9
  VALUE cXMLNode;
6
10
 
7
11
  /* Document-class: LibXML::XML::Node
@@ -997,17 +1001,6 @@ static VALUE rxml_node_path(VALUE self)
997
1001
  return result;
998
1002
  }
999
1003
 
1000
- /*
1001
- * call-seq:
1002
- * node.pointer -> XML::NodeSet
1003
- *
1004
- * Evaluates an XPointer expression relative to this node.
1005
- */
1006
- static VALUE rxml_node_pointer(VALUE self, VALUE xptr_str)
1007
- {
1008
- return (rxml_xpointer_point2(self, xptr_str));
1009
- }
1010
-
1011
1004
  /*
1012
1005
  * call-seq:
1013
1006
  * node.prev -> XML::Node
@@ -1393,7 +1386,6 @@ void rxml_init_node(void)
1393
1386
  rb_define_method(cXMLNode, "output_escaping?", rxml_node_output_escaping_q, 0);
1394
1387
  rb_define_method(cXMLNode, "output_escaping=", rxml_node_output_escaping_set, 1);
1395
1388
  rb_define_method(cXMLNode, "path", rxml_node_path, 0);
1396
- rb_define_method(cXMLNode, "pointer", rxml_node_pointer, 1);
1397
1389
  rb_define_method(cXMLNode, "remove!", rxml_node_remove_ex, 0);
1398
1390
  rb_define_method(cXMLNode, "space_preserve", rxml_node_space_preserve_get, 0);
1399
1391
  rb_define_method(cXMLNode, "space_preserve=", rxml_node_space_preserve_set, 1);
@@ -3,6 +3,8 @@
3
3
  #include "ruby_libxml.h"
4
4
  #include "ruby_xml_parser_context.h"
5
5
 
6
+ #include <libxml/parserInternals.h>
7
+
6
8
  VALUE cXMLParserContext;
7
9
  static ID IO_ATTR;
8
10
 
@@ -4,6 +4,9 @@
4
4
  #include "ruby_libxml.h"
5
5
  #include "ruby_xml_reader.h"
6
6
 
7
+ #include <libxml/xmlreader.h>
8
+ #include <libxml/xmlschemas.h>
9
+
7
10
  /*
8
11
  * Document-class: LibXML::XML::Reader
9
12
  *
@@ -4,9 +4,6 @@
4
4
  #ifndef __RXML_READER__
5
5
  #define __RXML_READER__
6
6
 
7
- #include <libxml/xmlreader.h>
8
- #include <libxml/xmlschemas.h>
9
-
10
7
  extern VALUE cXMLReader;
11
8
 
12
9
  void rxml_init_reader(void);
@@ -1,6 +1,8 @@
1
1
  #include "ruby_libxml.h"
2
2
  #include "ruby_xml_relaxng.h"
3
3
 
4
+ #include <libxml/relaxng.h>
5
+
4
6
  /*
5
7
  * Document-class: LibXML::XML::RelaxNG
6
8
  *
@@ -1,8 +1,6 @@
1
1
  #ifndef __RXML_RELAXNG__
2
2
  #define __RXML_RELAXNG__
3
3
 
4
- #include <libxml/relaxng.h>
5
-
6
4
  extern VALUE cXMLRelaxNG;
7
5
 
8
6
  void rxml_init_relaxng(void);
@@ -1,6 +1,4 @@
1
1
  #include "ruby_libxml.h"
2
- #define LIBXML_OUTPUT_ENABLED
3
- #define DUMP_CONTENT_MODEL
4
2
  #include "ruby_xml_schema.h"
5
3
 
6
4
  #include "ruby_xml_schema_type.h"
@@ -8,6 +6,78 @@
8
6
  #include "ruby_xml_schema_attribute.h"
9
7
  #include "ruby_xml_schema_facet.h"
10
8
 
9
+ #include <libxml/xmlschemas.h>
10
+
11
+ typedef struct _xmlSchemaBucket xmlSchemaBucket;
12
+ typedef xmlSchemaBucket *xmlSchemaBucketPtr;
13
+
14
+ /**
15
+ * xmlSchemaSchemaRelation:
16
+ *
17
+ * Used to create a graph of schema relationships.
18
+ */
19
+ typedef struct _xmlSchemaSchemaRelation xmlSchemaSchemaRelation;
20
+ typedef xmlSchemaSchemaRelation *xmlSchemaSchemaRelationPtr;
21
+ struct _xmlSchemaSchemaRelation {
22
+ xmlSchemaSchemaRelationPtr next;
23
+ int type;
24
+ /* E.g. XML_SCHEMA_SCHEMA_IMPORT */
25
+ const xmlChar *importNamespace;
26
+ xmlSchemaBucketPtr bucket;
27
+ };
28
+
29
+ struct _xmlSchemaBucket {
30
+ int type;
31
+ int flags;
32
+ const xmlChar *schemaLocation;
33
+ const xmlChar *origTargetNamespace;
34
+ const xmlChar *targetNamespace;
35
+ xmlDocPtr doc;
36
+ xmlSchemaSchemaRelationPtr relations;
37
+ int located;
38
+ int parsed;
39
+ int imported;
40
+ int preserveDoc;
41
+ xmlSchemaItemListPtr globals;
42
+ /* Global components. */
43
+ xmlSchemaItemListPtr locals; /* Local components. */
44
+ };
45
+
46
+ /**
47
+ * xmlSchemaImport:
48
+ * (extends xmlSchemaBucket)
49
+ *
50
+ * Reflects a schema. Holds some information
51
+ * about the schema and its toplevel components. Duplicate
52
+ * toplevel components are not checked at this level.
53
+ */
54
+ typedef struct _xmlSchemaImport xmlSchemaImport;
55
+ typedef xmlSchemaImport *xmlSchemaImportPtr;
56
+ struct _xmlSchemaImport {
57
+ int type;
58
+ /* Main OR import OR include. */
59
+ int flags;
60
+ const xmlChar *schemaLocation; /* The URI of the schema document. */
61
+ /* For chameleon includes, @origTargetNamespace will be NULL */
62
+ const xmlChar *origTargetNamespace;
63
+ /*
64
+ * For chameleon includes, @targetNamespace will be the
65
+ * targetNamespace of the including schema.
66
+ */
67
+ const xmlChar *targetNamespace;
68
+ xmlDocPtr doc; /* The schema node-tree. */
69
+ /* @relations will hold any included/imported/redefined schemas. */
70
+ xmlSchemaSchemaRelationPtr relations;
71
+ int located;
72
+ int parsed;
73
+ int imported;
74
+ int preserveDoc;
75
+ xmlSchemaItemListPtr globals;
76
+ xmlSchemaItemListPtr locals;
77
+ /* The imported schema. */
78
+ xmlSchemaPtr schema;
79
+ };
80
+
11
81
  /*
12
82
  * Document-class: LibXML::XML::Schema
13
83
  *