libxml-ruby 3.2.4-x64-mingw-ucrt → 4.1.1-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY +15 -0
- data/ext/libxml/libxml.c +0 -1
- data/ext/libxml/libxml_ruby.def +0 -1
- data/ext/libxml/ruby_libxml.h +0 -1
- data/ext/libxml/ruby_xml.c +1 -41
- data/ext/libxml/ruby_xml.h +1 -1
- data/ext/libxml/ruby_xml_cbg.c +1 -1
- data/ext/libxml/ruby_xml_dtd.c +1 -1
- data/ext/libxml/ruby_xml_encoding.c +2 -2
- data/ext/libxml/ruby_xml_error.c +3 -3
- data/ext/libxml/ruby_xml_error.h +1 -1
- data/ext/libxml/ruby_xml_html_parser_context.c +0 -1
- data/ext/libxml/ruby_xml_input_cbg.c +4 -7
- data/ext/libxml/ruby_xml_io.c +1 -1
- data/ext/libxml/ruby_xml_node.c +0 -12
- data/ext/libxml/ruby_xml_parser.h +0 -2
- data/ext/libxml/ruby_xml_parser_options.h +0 -2
- data/ext/libxml/ruby_xml_version.h +5 -5
- data/lib/3.1/libxml_ruby.so +0 -0
- data/lib/3.2/libxml_ruby.so +0 -0
- data/lib/libxml/error.rb +7 -7
- data/lib/libxml-ruby.rb +1 -1
- data/test/test_error.rb +173 -157
- data/test/test_xml.rb +0 -8
- metadata +4 -11
- data/MANIFEST +0 -166
- data/ext/libxml/ruby_xml_xpointer.c +0 -103
- data/ext/libxml/ruby_xml_xpointer.h +0 -11
- data/setup.rb +0 -1584
- data/test/test_suite.rb +0 -48
- data/test/test_xpointer.rb +0 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6eefbf4cf6f18a76d82973c0c297dd1ef37892a83ec1eea6b2b8a041e51a905
|
4
|
+
data.tar.gz: 427764544b4ca067c643cb9d504502dc56d22c4a722be2b7248016edd282b098
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9314838d6d6cbe1f0d87e48d2037ec3ad20eb70371f8022f5244a9a15b3d515bd901e577ebae90a39e7a36667bc5a0505e4ccc210471c3787dbf788adb396ec4
|
7
|
+
data.tar.gz: f1409c4f6e05cdd89e1596f49760b62ef1a65d22da343913488e74ee9d52c6a7c87019ceb61f958b1217064249d0f9a1ce3ee2fbd776ff234c67543a1ecd1d81
|
data/HISTORY
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
= Release History
|
2
2
|
|
3
|
+
== 4.1.1 / 2023-05-01
|
4
|
+
|
5
|
+
* Fix compile warning (or error) for input_callbacks_register_input_callbacks (Charlie Savage)
|
6
|
+
* Remove call to deprecated function htmlDefaultSAXHandlerInit (Charlie Savage)
|
7
|
+
|
8
|
+
== 4.1.0 / 2023-04-30
|
9
|
+
|
10
|
+
* Fix compile warning (or error) for rxml_encoding_to_rb_encoding (Charlie Savage)
|
11
|
+
* Breaking - Remove LibXML::XML.features since its uses functionality deprecated in LibXML (Charlie Savage)
|
12
|
+
|
13
|
+
== 4.0.0 / 2022-12-28
|
14
|
+
|
15
|
+
* Breaking - Remove support for XPointer since libxml2 has deprecated it and will remove it (Charlie Savage)
|
16
|
+
* Breaking - Remove support for ancient setup.rb script (Charlie Savage)
|
17
|
+
|
3
18
|
== 3.2.4 / 2022-10-29
|
4
19
|
|
5
20
|
* Support libxml2 version 2.10.2 (Charlie Savage)
|
data/ext/libxml/libxml.c
CHANGED
data/ext/libxml/libxml_ruby.def
CHANGED
data/ext/libxml/ruby_libxml.h
CHANGED
data/ext/libxml/ruby_xml.c
CHANGED
@@ -479,7 +479,7 @@ static VALUE rxml_default_line_numbers_set(VALUE klass, VALUE value)
|
|
479
479
|
}
|
480
480
|
}
|
481
481
|
|
482
|
-
int rxml_libxml_default_options()
|
482
|
+
int rxml_libxml_default_options(void)
|
483
483
|
{
|
484
484
|
int options = 0;
|
485
485
|
|
@@ -757,45 +757,6 @@ static VALUE rxml_default_save_no_empty_tags_set(VALUE klass, VALUE value)
|
|
757
757
|
}
|
758
758
|
}
|
759
759
|
|
760
|
-
/*
|
761
|
-
* call-seq:
|
762
|
-
* XML.features -> ["feature", ..., "feature"]
|
763
|
-
*
|
764
|
-
* Obtains an array of strings representing features supported
|
765
|
-
* (and enabled) by the installed libxml.
|
766
|
-
*/
|
767
|
-
static VALUE rxml_features(VALUE klass)
|
768
|
-
{
|
769
|
-
#ifndef LIBXML_LEGACY_ENABLED
|
770
|
-
return Qnil;
|
771
|
-
#else
|
772
|
-
VALUE arr, str;
|
773
|
-
int i, len = MAX_LIBXML_FEATURES_LEN;
|
774
|
-
char **list = NULL;
|
775
|
-
|
776
|
-
list = ALLOC_N(char *,MAX_LIBXML_FEATURES_LEN);
|
777
|
-
MEMZERO(list, char *, MAX_LIBXML_FEATURES_LEN);
|
778
|
-
|
779
|
-
arr = rb_ary_new();
|
780
|
-
if (xmlGetFeaturesList(&len, (const char **) list) == -1)
|
781
|
-
return Qnil;
|
782
|
-
|
783
|
-
for (i = 0; i < len; i++)
|
784
|
-
{
|
785
|
-
str = rb_str_new2((const char *) list[i]);
|
786
|
-
rb_gc_unregister_address(&str);
|
787
|
-
rb_ary_push(arr, str);
|
788
|
-
}
|
789
|
-
|
790
|
-
if (len == MAX_LIBXML_FEATURES_LEN)
|
791
|
-
rb_warn(
|
792
|
-
"Please contact libxml-devel@rubyforge.org and ask to have the \"MAX_LIBXML_FEATURES_LEN increased\" because you could possibly be seeing an incomplete list");
|
793
|
-
|
794
|
-
ruby_xfree(list);
|
795
|
-
return (arr);
|
796
|
-
#endif /* LIBXML_LEGACY_ENABLED */
|
797
|
-
}
|
798
|
-
|
799
760
|
/*
|
800
761
|
* call-seq:
|
801
762
|
* XML.indent_tree_output -> (true|false)
|
@@ -931,7 +892,6 @@ void rxml_init_xml(void)
|
|
931
892
|
rb_define_module_function(mXML, "default_warnings=", rxml_default_warnings_set, 1);
|
932
893
|
rb_define_module_function(mXML, "default_save_no_empty_tags", rxml_default_save_no_empty_tags_get, 0);
|
933
894
|
rb_define_module_function(mXML, "default_save_no_empty_tags=", rxml_default_save_no_empty_tags_set, 1);
|
934
|
-
rb_define_module_function(mXML, "features", rxml_features, 0);
|
935
895
|
rb_define_module_function(mXML, "indent_tree_output", rxml_indent_tree_output_get, 0);
|
936
896
|
rb_define_module_function(mXML, "indent_tree_output=", rxml_indent_tree_output_set, 1);
|
937
897
|
rb_define_module_function(mXML, "memory_dump", rxml_memory_dump, 0);
|
data/ext/libxml/ruby_xml.h
CHANGED
data/ext/libxml/ruby_xml_cbg.c
CHANGED
data/ext/libxml/ruby_xml_dtd.c
CHANGED
@@ -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)
|
@@ -197,7 +197,7 @@ void rxml_init_encoding(void)
|
|
197
197
|
rb_define_module_function(mXMLEncoding, "from_s", rxml_encoding_from_s, 1);
|
198
198
|
rb_define_module_function(mXMLEncoding, "to_s", rxml_encoding_to_s, 1);
|
199
199
|
|
200
|
-
rb_define_module_function(mXMLEncoding, "to_rb_encoding", rxml_encoding_to_rb_encoding,
|
200
|
+
rb_define_module_function(mXMLEncoding, "to_rb_encoding", rxml_encoding_to_rb_encoding, 1);
|
201
201
|
|
202
202
|
/* -1: No char encoding detected. */
|
203
203
|
rb_define_const(mXMLEncoding, "ERROR", INT2NUM(XML_CHAR_ENCODING_ERROR));
|
data/ext/libxml/ruby_xml_error.c
CHANGED
@@ -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(VALUE self)
|
48
48
|
{
|
49
49
|
VALUE block = rb_cvar_get(eXMLError, ERROR_HANDLER_ID);
|
50
50
|
return block;
|
@@ -102,7 +102,7 @@ static void structuredErrorFunc(void *userData, xmlErrorPtr xerror)
|
|
102
102
|
VALUE error = rxml_error_wrap(xerror);
|
103
103
|
|
104
104
|
/* Wrap error up as Ruby object and send it off to ruby */
|
105
|
-
VALUE block = rxml_error_get_handler();
|
105
|
+
VALUE block = rxml_error_get_handler(error);
|
106
106
|
|
107
107
|
/* Now call global handler */
|
108
108
|
if (block != Qnil)
|
@@ -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__");
|
data/ext/libxml/ruby_xml_error.h
CHANGED
@@ -243,7 +243,6 @@ static VALUE rxml_html_parser_context_string(VALUE klass, VALUE string)
|
|
243
243
|
sets to 0 and xmlCtxtUseOptionsInternal sets to 1. So we have to call both. */
|
244
244
|
htmlCtxtUseOptions(ctxt, rxml_libxml_default_options());
|
245
245
|
|
246
|
-
htmlDefaultSAXHandlerInit();
|
247
246
|
if (ctxt->sax != NULL)
|
248
247
|
memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
|
249
248
|
|
@@ -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(VALUE self)
|
92
92
|
{
|
93
93
|
xmlRegisterInputCallbacks(ic_match, ic_open, ic_read, ic_close);
|
94
94
|
return (Qtrue);
|
@@ -182,10 +182,7 @@ void rxml_init_input_callbacks(void)
|
|
182
182
|
cInputCallbacks = rb_define_class_under(mXML, "InputCallbacks", rb_cObject);
|
183
183
|
|
184
184
|
/* Class Methods */
|
185
|
-
rb_define_singleton_method(cInputCallbacks, "register",
|
186
|
-
|
187
|
-
rb_define_singleton_method(cInputCallbacks, "
|
188
|
-
input_callbacks_add_scheme, 2);
|
189
|
-
rb_define_singleton_method(cInputCallbacks, "remove_scheme",
|
190
|
-
input_callbacks_remove_scheme, 1);
|
185
|
+
rb_define_singleton_method(cInputCallbacks, "register", input_callbacks_register_input_callbacks, 0);
|
186
|
+
rb_define_singleton_method(cInputCallbacks, "add_scheme", input_callbacks_add_scheme, 2);
|
187
|
+
rb_define_singleton_method(cInputCallbacks, "remove_scheme", input_callbacks_remove_scheme, 1);
|
191
188
|
}
|
data/ext/libxml/ruby_xml_io.c
CHANGED
@@ -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
|
}
|
data/ext/libxml/ruby_xml_node.c
CHANGED
@@ -1001,17 +1001,6 @@ static VALUE rxml_node_path(VALUE self)
|
|
1001
1001
|
return result;
|
1002
1002
|
}
|
1003
1003
|
|
1004
|
-
/*
|
1005
|
-
* call-seq:
|
1006
|
-
* node.pointer -> XML::NodeSet
|
1007
|
-
*
|
1008
|
-
* Evaluates an XPointer expression relative to this node.
|
1009
|
-
*/
|
1010
|
-
static VALUE rxml_node_pointer(VALUE self, VALUE xptr_str)
|
1011
|
-
{
|
1012
|
-
return (rxml_xpointer_point2(self, xptr_str));
|
1013
|
-
}
|
1014
|
-
|
1015
1004
|
/*
|
1016
1005
|
* call-seq:
|
1017
1006
|
* node.prev -> XML::Node
|
@@ -1397,7 +1386,6 @@ void rxml_init_node(void)
|
|
1397
1386
|
rb_define_method(cXMLNode, "output_escaping?", rxml_node_output_escaping_q, 0);
|
1398
1387
|
rb_define_method(cXMLNode, "output_escaping=", rxml_node_output_escaping_set, 1);
|
1399
1388
|
rb_define_method(cXMLNode, "path", rxml_node_path, 0);
|
1400
|
-
rb_define_method(cXMLNode, "pointer", rxml_node_pointer, 1);
|
1401
1389
|
rb_define_method(cXMLNode, "remove!", rxml_node_remove_ex, 0);
|
1402
1390
|
rb_define_method(cXMLNode, "space_preserve", rxml_node_space_preserve_get, 0);
|
1403
1391
|
rb_define_method(cXMLNode, "space_preserve=", rxml_node_space_preserve_set, 1);
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/* Don't nuke this block! It is used for automatically updating the
|
2
2
|
* versions below. VERSION = string formatting, VERNUM = numbered
|
3
3
|
* version for inline testing: increment both or none at all.*/
|
4
|
-
#define RUBY_LIBXML_VERSION "
|
5
|
-
#define RUBY_LIBXML_VERNUM
|
6
|
-
#define RUBY_LIBXML_VER_MAJ
|
7
|
-
#define RUBY_LIBXML_VER_MIN
|
8
|
-
#define RUBY_LIBXML_VER_MIC
|
4
|
+
#define RUBY_LIBXML_VERSION "4.1.1"
|
5
|
+
#define RUBY_LIBXML_VERNUM 400
|
6
|
+
#define RUBY_LIBXML_VER_MAJ 4
|
7
|
+
#define RUBY_LIBXML_VER_MIN 1
|
8
|
+
#define RUBY_LIBXML_VER_MIC 1
|
9
9
|
#define RUBY_LIBXML_VER_PATCH 0
|
data/lib/3.1/libxml_ruby.so
CHANGED
Binary file
|
Binary file
|
data/lib/libxml/error.rb
CHANGED
@@ -3,24 +3,24 @@
|
|
3
3
|
module LibXML
|
4
4
|
module XML
|
5
5
|
class Error
|
6
|
-
# Create mapping from domain constant
|
6
|
+
# Create mapping from domain constant values to keys
|
7
7
|
DOMAIN_CODE_MAP = [:NO_ERROR, :PARSER, :TREE, :NAMESPACE, :DTD, :HTML, :MEMORY,
|
8
8
|
:OUTPUT, :IO, :FTP, :HTTP, :XINCLUDE, :XPATH, :XPOINTER, :REGEXP,
|
9
9
|
:DATATYPE, :SCHEMASP, :SCHEMASV, :RELAXNGP, :RELAXNGV, :CATALOG,
|
10
10
|
:C14N, :XSLT, :VALID, :CHECK, :WRITER, :MODULE, :I18N, :SCHEMATRONV].inject(Hash.new) do |hash, code|
|
11
11
|
if const_defined?(code)
|
12
|
-
hash[const_get(code)] = code
|
12
|
+
hash[const_get(code)] = code
|
13
13
|
end
|
14
14
|
hash
|
15
15
|
end
|
16
16
|
|
17
|
-
# Create mapping from
|
17
|
+
# Create mapping from error constant values (so need to remove domain_codes) to keys
|
18
18
|
ERROR_CODE_MAP = Hash.new.tap do |map|
|
19
19
|
(constants -
|
20
20
|
DOMAIN_CODE_MAP.values - #Domains
|
21
21
|
[:NONE, :WARNING, :ERROR, :FATAL] # Levels
|
22
22
|
).each do |code|
|
23
|
-
map[const_get(code)] = code
|
23
|
+
map[const_get(code)] = code
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -70,11 +70,11 @@ module LibXML
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def domain_to_s
|
73
|
-
DOMAIN_CODE_MAP[self.domain]
|
73
|
+
DOMAIN_CODE_MAP[self.domain].to_s
|
74
74
|
end
|
75
75
|
|
76
76
|
def code_to_s
|
77
|
-
ERROR_CODE_MAP[self.code]
|
77
|
+
ERROR_CODE_MAP[self.code].to_s
|
78
78
|
end
|
79
79
|
|
80
80
|
def to_s
|
@@ -92,4 +92,4 @@ module LibXML
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
LibXML::XML::Error.set_handler(&LibXML::XML::Error::VERBOSE_HANDLER)
|
95
|
+
LibXML::XML::Error.set_handler(&LibXML::XML::Error::VERBOSE_HANDLER)
|