nokogiri 1.11.3 → 1.13.8
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 +2 -0
- data/LICENSE-DEPENDENCIES.md +243 -22
- data/LICENSE.md +1 -1
- data/README.md +14 -11
- data/bin/nokogiri +63 -50
- data/dependencies.yml +13 -64
- data/ext/nokogiri/depend +35 -34
- data/ext/nokogiri/extconf.rb +237 -133
- data/ext/nokogiri/gumbo.c +584 -0
- data/ext/nokogiri/{html_document.c → html4_document.c} +8 -8
- data/ext/nokogiri/{html_element_description.c → html4_element_description.c} +21 -19
- data/ext/nokogiri/{html_entity_lookup.c → html4_entity_lookup.c} +7 -7
- data/ext/nokogiri/{html_sax_parser_context.c → html4_sax_parser_context.c} +8 -8
- data/ext/nokogiri/{html_sax_push_parser.c → html4_sax_push_parser.c} +4 -4
- data/ext/nokogiri/libxml2_backwards_compat.c +30 -30
- data/ext/nokogiri/nokogiri.c +70 -38
- data/ext/nokogiri/nokogiri.h +27 -9
- data/ext/nokogiri/xml_attr.c +2 -2
- data/ext/nokogiri/xml_attribute_decl.c +3 -3
- data/ext/nokogiri/xml_cdata.c +1 -1
- data/ext/nokogiri/xml_document.c +50 -50
- data/ext/nokogiri/xml_document_fragment.c +0 -2
- data/ext/nokogiri/xml_dtd.c +10 -10
- data/ext/nokogiri/xml_element_content.c +2 -0
- data/ext/nokogiri/xml_element_decl.c +3 -3
- data/ext/nokogiri/xml_encoding_handler.c +31 -12
- data/ext/nokogiri/xml_entity_decl.c +5 -5
- data/ext/nokogiri/xml_namespace.c +4 -2
- data/ext/nokogiri/xml_node.c +833 -492
- data/ext/nokogiri/xml_node_set.c +24 -24
- data/ext/nokogiri/xml_reader.c +90 -11
- data/ext/nokogiri/xml_sax_parser.c +6 -6
- data/ext/nokogiri/xml_sax_parser_context.c +12 -3
- data/ext/nokogiri/xml_schema.c +5 -3
- data/ext/nokogiri/xml_text.c +1 -1
- data/ext/nokogiri/xml_xpath_context.c +110 -85
- data/ext/nokogiri/xslt_stylesheet.c +109 -10
- data/gumbo-parser/CHANGES.md +63 -0
- data/gumbo-parser/Makefile +101 -0
- data/gumbo-parser/THANKS +27 -0
- data/gumbo-parser/src/Makefile +34 -0
- data/gumbo-parser/src/README.md +41 -0
- data/gumbo-parser/src/ascii.c +75 -0
- data/gumbo-parser/src/ascii.h +115 -0
- data/gumbo-parser/src/attribute.c +42 -0
- data/gumbo-parser/src/attribute.h +17 -0
- data/gumbo-parser/src/char_ref.c +22225 -0
- data/gumbo-parser/src/char_ref.h +29 -0
- data/gumbo-parser/src/char_ref.rl +2154 -0
- data/gumbo-parser/src/error.c +626 -0
- data/gumbo-parser/src/error.h +148 -0
- data/gumbo-parser/src/foreign_attrs.c +104 -0
- data/gumbo-parser/src/foreign_attrs.gperf +27 -0
- data/gumbo-parser/src/gumbo.h +943 -0
- data/gumbo-parser/src/insertion_mode.h +33 -0
- data/gumbo-parser/src/macros.h +91 -0
- data/gumbo-parser/src/parser.c +4875 -0
- data/gumbo-parser/src/parser.h +41 -0
- data/gumbo-parser/src/replacement.h +33 -0
- data/gumbo-parser/src/string_buffer.c +103 -0
- data/gumbo-parser/src/string_buffer.h +68 -0
- data/gumbo-parser/src/string_piece.c +48 -0
- data/gumbo-parser/src/svg_attrs.c +174 -0
- data/gumbo-parser/src/svg_attrs.gperf +77 -0
- data/gumbo-parser/src/svg_tags.c +137 -0
- data/gumbo-parser/src/svg_tags.gperf +55 -0
- data/gumbo-parser/src/tag.c +222 -0
- data/gumbo-parser/src/tag_lookup.c +382 -0
- data/gumbo-parser/src/tag_lookup.gperf +169 -0
- data/gumbo-parser/src/tag_lookup.h +13 -0
- data/gumbo-parser/src/token_buffer.c +79 -0
- data/gumbo-parser/src/token_buffer.h +71 -0
- data/gumbo-parser/src/token_type.h +17 -0
- data/gumbo-parser/src/tokenizer.c +3463 -0
- data/gumbo-parser/src/tokenizer.h +112 -0
- data/gumbo-parser/src/tokenizer_states.h +339 -0
- data/gumbo-parser/src/utf8.c +245 -0
- data/gumbo-parser/src/utf8.h +164 -0
- data/gumbo-parser/src/util.c +68 -0
- data/gumbo-parser/src/util.h +30 -0
- data/gumbo-parser/src/vector.c +111 -0
- data/gumbo-parser/src/vector.h +45 -0
- data/lib/nokogiri/class_resolver.rb +67 -0
- data/lib/nokogiri/css/node.rb +9 -8
- data/lib/nokogiri/css/parser.rb +361 -342
- data/lib/nokogiri/css/parser.y +250 -245
- data/lib/nokogiri/css/parser_extras.rb +22 -20
- data/lib/nokogiri/css/syntax_error.rb +2 -1
- data/lib/nokogiri/css/tokenizer.rb +4 -3
- data/lib/nokogiri/css/tokenizer.rex +3 -2
- data/lib/nokogiri/css/xpath_visitor.rb +179 -82
- data/lib/nokogiri/css.rb +49 -17
- data/lib/nokogiri/decorators/slop.rb +8 -7
- data/lib/nokogiri/extension.rb +8 -3
- data/lib/nokogiri/gumbo.rb +15 -0
- data/lib/nokogiri/html.rb +37 -27
- data/lib/nokogiri/{html → html4}/builder.rb +3 -2
- data/lib/nokogiri/{html → html4}/document.rb +92 -81
- data/lib/nokogiri/{html → html4}/document_fragment.rb +13 -9
- data/lib/nokogiri/{html → html4}/element_description.rb +2 -1
- data/lib/nokogiri/html4/element_description_defaults.rb +578 -0
- data/lib/nokogiri/{html → html4}/entity_lookup.rb +3 -2
- data/lib/nokogiri/{html → html4}/sax/parser.rb +16 -16
- data/lib/nokogiri/html4/sax/parser_context.rb +20 -0
- data/lib/nokogiri/{html → html4}/sax/push_parser.rb +11 -11
- data/lib/nokogiri/html4.rb +46 -0
- data/lib/nokogiri/html5/document.rb +91 -0
- data/lib/nokogiri/html5/document_fragment.rb +83 -0
- data/lib/nokogiri/html5/node.rb +100 -0
- data/lib/nokogiri/html5.rb +478 -0
- data/lib/nokogiri/jruby/dependencies.rb +10 -9
- data/lib/nokogiri/syntax_error.rb +1 -0
- data/lib/nokogiri/version/constant.rb +2 -1
- data/lib/nokogiri/version/info.rb +31 -14
- data/lib/nokogiri/version.rb +1 -0
- data/lib/nokogiri/xml/attr.rb +5 -3
- data/lib/nokogiri/xml/attribute_decl.rb +2 -1
- data/lib/nokogiri/xml/builder.rb +71 -31
- data/lib/nokogiri/xml/cdata.rb +2 -1
- data/lib/nokogiri/xml/character_data.rb +1 -0
- data/lib/nokogiri/xml/document.rb +183 -96
- data/lib/nokogiri/xml/document_fragment.rb +41 -38
- data/lib/nokogiri/xml/dtd.rb +3 -2
- data/lib/nokogiri/xml/element_content.rb +1 -0
- data/lib/nokogiri/xml/element_decl.rb +2 -1
- data/lib/nokogiri/xml/entity_decl.rb +3 -2
- data/lib/nokogiri/xml/entity_reference.rb +1 -0
- data/lib/nokogiri/xml/namespace.rb +2 -0
- data/lib/nokogiri/xml/node/save_options.rb +9 -5
- data/lib/nokogiri/xml/node.rb +525 -354
- data/lib/nokogiri/xml/node_set.rb +50 -54
- data/lib/nokogiri/xml/notation.rb +12 -0
- data/lib/nokogiri/xml/parse_options.rb +13 -6
- data/lib/nokogiri/xml/pp/character_data.rb +8 -6
- data/lib/nokogiri/xml/pp/node.rb +24 -26
- data/lib/nokogiri/xml/pp.rb +3 -2
- data/lib/nokogiri/xml/processing_instruction.rb +2 -1
- data/lib/nokogiri/xml/reader.rb +20 -24
- data/lib/nokogiri/xml/relax_ng.rb +1 -0
- data/lib/nokogiri/xml/sax/document.rb +44 -49
- data/lib/nokogiri/xml/sax/parser.rb +37 -34
- data/lib/nokogiri/xml/sax/parser_context.rb +7 -3
- data/lib/nokogiri/xml/sax/push_parser.rb +5 -5
- data/lib/nokogiri/xml/sax.rb +5 -4
- data/lib/nokogiri/xml/schema.rb +7 -6
- data/lib/nokogiri/xml/searchable.rb +93 -62
- data/lib/nokogiri/xml/syntax_error.rb +5 -4
- data/lib/nokogiri/xml/text.rb +1 -0
- data/lib/nokogiri/xml/xpath/syntax_error.rb +2 -1
- data/lib/nokogiri/xml/xpath.rb +13 -1
- data/lib/nokogiri/xml/xpath_context.rb +2 -3
- data/lib/nokogiri/xml.rb +37 -37
- data/lib/nokogiri/xslt/stylesheet.rb +2 -1
- data/lib/nokogiri/xslt.rb +28 -20
- data/lib/nokogiri.rb +48 -43
- data/lib/xsd/xmlparser/nokogiri.rb +25 -24
- data/patches/libxml2/{0002-Remove-script-macro-support.patch → 0001-Remove-script-macro-support.patch} +0 -0
- data/patches/libxml2/{0003-Update-entities-to-remove-handling-of-ssi.patch → 0002-Update-entities-to-remove-handling-of-ssi.patch} +0 -0
- data/patches/libxml2/{0004-libxml2.la-is-in-top_builddir.patch → 0003-libxml2.la-is-in-top_builddir.patch} +1 -1
- data/patches/libxml2/{0008-use-glibc-strlen.patch → 0004-use-glibc-strlen.patch} +3 -3
- data/patches/libxml2/{0009-avoid-isnan-isinf.patch → 0005-avoid-isnan-isinf.patch} +4 -4
- data/patches/libxml2/0006-update-automake-files-for-arm64.patch +3040 -0
- data/patches/libxml2/0008-htmlParseComment-handle-abruptly-closed-comments.patch +61 -0
- data/patches/libxml2/0009-allow-wildcard-namespaces.patch +77 -0
- data/patches/libxslt/0001-update-automake-files-for-arm64.patch +2445 -1919
- data/ports/archives/libxml2-2.9.14.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.35.tar.xz +0 -0
- metadata +204 -93
- data/lib/nokogiri/html/element_description_defaults.rb +0 -672
- data/lib/nokogiri/html/sax/parser_context.rb +0 -17
- data/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +0 -78
- data/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch +0 -32
- data/patches/libxml2/0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch +0 -73
- data/patches/libxml2/0007-use-new-htmlParseLookupCommentEnd-to-find-comment-en.patch +0 -103
- data/patches/libxml2/0010-parser.c-shrink-the-input-buffer-when-appropriate.patch +0 -70
- data/patches/libxml2/0011-update-automake-files-for-arm64.patch +0 -2511
- data/ports/archives/libxml2-2.9.10.tar.gz +0 -0
- data/ports/archives/libxslt-1.1.34.tar.gz +0 -0
data/ext/nokogiri/xml_dtd.c
CHANGED
@@ -44,7 +44,7 @@ entities(VALUE self)
|
|
44
44
|
xmlDtdPtr dtd;
|
45
45
|
VALUE hash;
|
46
46
|
|
47
|
-
|
47
|
+
Noko_Node_Get_Struct(self, xmlDtd, dtd);
|
48
48
|
|
49
49
|
if (!dtd->entities) { return Qnil; }
|
50
50
|
|
@@ -57,9 +57,9 @@ entities(VALUE self)
|
|
57
57
|
|
58
58
|
/*
|
59
59
|
* call-seq:
|
60
|
-
* notations
|
60
|
+
* notations() → Hash<name(String)⇒Notation>
|
61
61
|
*
|
62
|
-
*
|
62
|
+
* [Returns] All the notations for this DTD in a Hash of Notation +name+ to Notation.
|
63
63
|
*/
|
64
64
|
static VALUE
|
65
65
|
notations(VALUE self)
|
@@ -67,7 +67,7 @@ notations(VALUE self)
|
|
67
67
|
xmlDtdPtr dtd;
|
68
68
|
VALUE hash;
|
69
69
|
|
70
|
-
|
70
|
+
Noko_Node_Get_Struct(self, xmlDtd, dtd);
|
71
71
|
|
72
72
|
if (!dtd->notations) { return Qnil; }
|
73
73
|
|
@@ -90,7 +90,7 @@ attributes(VALUE self)
|
|
90
90
|
xmlDtdPtr dtd;
|
91
91
|
VALUE hash;
|
92
92
|
|
93
|
-
|
93
|
+
Noko_Node_Get_Struct(self, xmlDtd, dtd);
|
94
94
|
|
95
95
|
hash = rb_hash_new();
|
96
96
|
|
@@ -113,7 +113,7 @@ elements(VALUE self)
|
|
113
113
|
xmlDtdPtr dtd;
|
114
114
|
VALUE hash;
|
115
115
|
|
116
|
-
|
116
|
+
Noko_Node_Get_Struct(self, xmlDtd, dtd);
|
117
117
|
|
118
118
|
if (!dtd->elements) { return Qnil; }
|
119
119
|
|
@@ -138,8 +138,8 @@ validate(VALUE self, VALUE document)
|
|
138
138
|
xmlValidCtxtPtr ctxt;
|
139
139
|
VALUE error_list;
|
140
140
|
|
141
|
-
|
142
|
-
|
141
|
+
Noko_Node_Get_Struct(self, xmlDtd, dtd);
|
142
|
+
Noko_Node_Get_Struct(document, xmlDoc, doc);
|
143
143
|
error_list = rb_ary_new();
|
144
144
|
|
145
145
|
ctxt = xmlNewValidCtxt();
|
@@ -165,7 +165,7 @@ static VALUE
|
|
165
165
|
system_id(VALUE self)
|
166
166
|
{
|
167
167
|
xmlDtdPtr dtd;
|
168
|
-
|
168
|
+
Noko_Node_Get_Struct(self, xmlDtd, dtd);
|
169
169
|
|
170
170
|
if (!dtd->SystemID) { return Qnil; }
|
171
171
|
|
@@ -182,7 +182,7 @@ static VALUE
|
|
182
182
|
external_id(VALUE self)
|
183
183
|
{
|
184
184
|
xmlDtdPtr dtd;
|
185
|
-
|
185
|
+
Noko_Node_Get_Struct(self, xmlDtd, dtd);
|
186
186
|
|
187
187
|
if (!dtd->ExternalID) { return Qnil; }
|
188
188
|
|
@@ -116,6 +116,8 @@ noko_init_xml_element_content()
|
|
116
116
|
{
|
117
117
|
cNokogiriXmlElementContent = rb_define_class_under(mNokogiriXml, "ElementContent", rb_cObject);
|
118
118
|
|
119
|
+
rb_undef_alloc_func(cNokogiriXmlElementContent);
|
120
|
+
|
119
121
|
rb_define_method(cNokogiriXmlElementContent, "name", get_name, 0);
|
120
122
|
rb_define_method(cNokogiriXmlElementContent, "type", get_type, 0);
|
121
123
|
rb_define_method(cNokogiriXmlElementContent, "occur", get_occur, 0);
|
@@ -14,7 +14,7 @@ static VALUE
|
|
14
14
|
element_type(VALUE self)
|
15
15
|
{
|
16
16
|
xmlElementPtr node;
|
17
|
-
|
17
|
+
Noko_Node_Get_Struct(self, xmlElement, node);
|
18
18
|
return INT2NUM((long)node->etype);
|
19
19
|
}
|
20
20
|
|
@@ -28,7 +28,7 @@ static VALUE
|
|
28
28
|
content(VALUE self)
|
29
29
|
{
|
30
30
|
xmlElementPtr node;
|
31
|
-
|
31
|
+
Noko_Node_Get_Struct(self, xmlElement, node);
|
32
32
|
|
33
33
|
if (!node->content) { return Qnil; }
|
34
34
|
|
@@ -48,7 +48,7 @@ static VALUE
|
|
48
48
|
prefix(VALUE self)
|
49
49
|
{
|
50
50
|
xmlElementPtr node;
|
51
|
-
|
51
|
+
Noko_Node_Get_Struct(self, xmlElement, node);
|
52
52
|
|
53
53
|
if (!node->prefix) { return Qnil; }
|
54
54
|
|
@@ -1,69 +1,84 @@
|
|
1
1
|
#include <nokogiri.h>
|
2
2
|
|
3
|
+
VALUE cNokogiriEncodingHandler;
|
4
|
+
|
5
|
+
|
6
|
+
static void
|
7
|
+
_xml_encoding_handler_dealloc(xmlCharEncodingHandlerPtr c_handler)
|
8
|
+
{
|
9
|
+
/* make sure iconv handlers are cleaned up and freed */
|
10
|
+
xmlCharEncCloseFunc(c_handler);
|
11
|
+
}
|
12
|
+
|
13
|
+
|
3
14
|
/*
|
4
15
|
* call-seq: Nokogiri::EncodingHandler.[](name)
|
5
16
|
*
|
6
17
|
* Get the encoding handler for +name+
|
7
18
|
*/
|
8
19
|
static VALUE
|
9
|
-
|
20
|
+
rb_xml_encoding_handler_s_get(VALUE klass, VALUE key)
|
10
21
|
{
|
11
22
|
xmlCharEncodingHandlerPtr handler;
|
12
23
|
|
13
24
|
handler = xmlFindCharEncodingHandler(StringValueCStr(key));
|
14
25
|
if (handler) {
|
15
|
-
return Data_Wrap_Struct(klass, NULL,
|
26
|
+
return Data_Wrap_Struct(klass, NULL, _xml_encoding_handler_dealloc, handler);
|
16
27
|
}
|
17
28
|
|
18
29
|
return Qnil;
|
19
30
|
}
|
20
31
|
|
32
|
+
|
21
33
|
/*
|
22
34
|
* call-seq: Nokogiri::EncodingHandler.delete(name)
|
23
35
|
*
|
24
36
|
* Delete the encoding alias named +name+
|
25
37
|
*/
|
26
38
|
static VALUE
|
27
|
-
|
39
|
+
rb_xml_encoding_handler_s_delete(VALUE klass, VALUE name)
|
28
40
|
{
|
29
41
|
if (xmlDelEncodingAlias(StringValueCStr(name))) { return Qnil; }
|
30
42
|
|
31
43
|
return Qtrue;
|
32
44
|
}
|
33
45
|
|
46
|
+
|
34
47
|
/*
|
35
48
|
* call-seq: Nokogiri::EncodingHandler.alias(from, to)
|
36
49
|
*
|
37
50
|
* Alias encoding handler with name +from+ to name +to+
|
38
51
|
*/
|
39
52
|
static VALUE
|
40
|
-
|
53
|
+
rb_xml_encoding_handler_s_alias(VALUE klass, VALUE from, VALUE to)
|
41
54
|
{
|
42
55
|
xmlAddEncodingAlias(StringValueCStr(from), StringValueCStr(to));
|
43
56
|
|
44
57
|
return to;
|
45
58
|
}
|
46
59
|
|
60
|
+
|
47
61
|
/*
|
48
62
|
* call-seq: Nokogiri::EncodingHandler.clear_aliases!
|
49
63
|
*
|
50
64
|
* Remove all encoding aliases.
|
51
65
|
*/
|
52
66
|
static VALUE
|
53
|
-
|
67
|
+
rb_xml_encoding_handler_s_clear_aliases(VALUE klass)
|
54
68
|
{
|
55
69
|
xmlCleanupEncodingAliases();
|
56
70
|
|
57
71
|
return klass;
|
58
72
|
}
|
59
73
|
|
74
|
+
|
60
75
|
/*
|
61
76
|
* call-seq: name
|
62
77
|
*
|
63
78
|
* Get the name of this EncodingHandler
|
64
79
|
*/
|
65
80
|
static VALUE
|
66
|
-
|
81
|
+
rb_xml_encoding_handler_name(VALUE self)
|
67
82
|
{
|
68
83
|
xmlCharEncodingHandlerPtr handler;
|
69
84
|
|
@@ -72,14 +87,18 @@ name(VALUE self)
|
|
72
87
|
return NOKOGIRI_STR_NEW2(handler->name);
|
73
88
|
}
|
74
89
|
|
90
|
+
|
75
91
|
void
|
76
92
|
noko_init_xml_encoding_handler()
|
77
93
|
{
|
78
|
-
|
94
|
+
cNokogiriEncodingHandler = rb_define_class_under(mNokogiri, "EncodingHandler", rb_cObject);
|
95
|
+
|
96
|
+
rb_undef_alloc_func(cNokogiriEncodingHandler);
|
97
|
+
|
98
|
+
rb_define_singleton_method(cNokogiriEncodingHandler, "[]", rb_xml_encoding_handler_s_get, 1);
|
99
|
+
rb_define_singleton_method(cNokogiriEncodingHandler, "delete", rb_xml_encoding_handler_s_delete, 1);
|
100
|
+
rb_define_singleton_method(cNokogiriEncodingHandler, "alias", rb_xml_encoding_handler_s_alias, 2);
|
101
|
+
rb_define_singleton_method(cNokogiriEncodingHandler, "clear_aliases!", rb_xml_encoding_handler_s_clear_aliases, 0);
|
79
102
|
|
80
|
-
|
81
|
-
rb_define_singleton_method(klass, "delete", delete, 1);
|
82
|
-
rb_define_singleton_method(klass, "alias", alias, 2);
|
83
|
-
rb_define_singleton_method(klass, "clear_aliases!", clear_aliases, 0);
|
84
|
-
rb_define_method(klass, "name", name, 0);
|
103
|
+
rb_define_method(cNokogiriEncodingHandler, "name", rb_xml_encoding_handler_name, 0);
|
85
104
|
}
|
@@ -12,7 +12,7 @@ static VALUE
|
|
12
12
|
original_content(VALUE self)
|
13
13
|
{
|
14
14
|
xmlEntityPtr node;
|
15
|
-
|
15
|
+
Noko_Node_Get_Struct(self, xmlEntity, node);
|
16
16
|
|
17
17
|
if (!node->orig) { return Qnil; }
|
18
18
|
|
@@ -29,7 +29,7 @@ static VALUE
|
|
29
29
|
get_content(VALUE self)
|
30
30
|
{
|
31
31
|
xmlEntityPtr node;
|
32
|
-
|
32
|
+
Noko_Node_Get_Struct(self, xmlEntity, node);
|
33
33
|
|
34
34
|
if (!node->content) { return Qnil; }
|
35
35
|
|
@@ -46,7 +46,7 @@ static VALUE
|
|
46
46
|
entity_type(VALUE self)
|
47
47
|
{
|
48
48
|
xmlEntityPtr node;
|
49
|
-
|
49
|
+
Noko_Node_Get_Struct(self, xmlEntity, node);
|
50
50
|
|
51
51
|
return INT2NUM((int)node->etype);
|
52
52
|
}
|
@@ -61,7 +61,7 @@ static VALUE
|
|
61
61
|
external_id(VALUE self)
|
62
62
|
{
|
63
63
|
xmlEntityPtr node;
|
64
|
-
|
64
|
+
Noko_Node_Get_Struct(self, xmlEntity, node);
|
65
65
|
|
66
66
|
if (!node->ExternalID) { return Qnil; }
|
67
67
|
|
@@ -78,7 +78,7 @@ static VALUE
|
|
78
78
|
system_id(VALUE self)
|
79
79
|
{
|
80
80
|
xmlEntityPtr node;
|
81
|
-
|
81
|
+
Noko_Node_Get_Struct(self, xmlEntity, node);
|
82
82
|
|
83
83
|
if (!node->SystemID) { return Qnil; }
|
84
84
|
|
@@ -33,10 +33,10 @@ dealloc_namespace(xmlNsPtr ns)
|
|
33
33
|
*/
|
34
34
|
NOKOGIRI_DEBUG_START(ns) ;
|
35
35
|
if (ns->href) {
|
36
|
-
xmlFree((
|
36
|
+
xmlFree(DISCARD_CONST_QUAL_XMLCHAR(ns->href));
|
37
37
|
}
|
38
38
|
if (ns->prefix) {
|
39
|
-
xmlFree((
|
39
|
+
xmlFree(DISCARD_CONST_QUAL_XMLCHAR(ns->prefix));
|
40
40
|
}
|
41
41
|
xmlFree(ns);
|
42
42
|
NOKOGIRI_DEBUG_END(ns) ;
|
@@ -113,6 +113,8 @@ noko_init_xml_namespace()
|
|
113
113
|
{
|
114
114
|
cNokogiriXmlNamespace = rb_define_class_under(mNokogiriXml, "Namespace", rb_cObject);
|
115
115
|
|
116
|
+
rb_undef_alloc_func(cNokogiriXmlNamespace);
|
117
|
+
|
116
118
|
rb_define_method(cNokogiriXmlNamespace, "prefix", prefix, 0);
|
117
119
|
rb_define_method(cNokogiriXmlNamespace, "href", href, 0);
|
118
120
|
}
|