libxml-ruby 2.7.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/HISTORY +33 -11
- data/README.rdoc +7 -7
- data/Rakefile +80 -77
- data/ext/libxml/extconf.h +4 -5
- data/ext/libxml/extconf.rb +57 -118
- data/ext/libxml/libxml.c +4 -0
- data/ext/libxml/ruby_xml.c +977 -893
- data/ext/libxml/ruby_xml.h +20 -10
- data/ext/libxml/ruby_xml_attr.c +333 -333
- data/ext/libxml/ruby_xml_attr_decl.c +2 -2
- data/ext/libxml/ruby_xml_cbg.c +85 -85
- data/ext/libxml/ruby_xml_document.c +1133 -1147
- data/ext/libxml/ruby_xml_dtd.c +261 -268
- data/ext/libxml/ruby_xml_encoding.c +262 -260
- data/ext/libxml/ruby_xml_encoding.h +19 -19
- data/ext/libxml/ruby_xml_html_parser_context.c +337 -338
- data/ext/libxml/ruby_xml_input_cbg.c +191 -191
- data/ext/libxml/ruby_xml_io.c +52 -50
- data/ext/libxml/ruby_xml_namespace.c +2 -2
- data/ext/libxml/ruby_xml_node.c +1446 -1452
- data/ext/libxml/ruby_xml_parser_context.c +999 -1001
- data/ext/libxml/ruby_xml_reader.c +1226 -1228
- data/ext/libxml/ruby_xml_relaxng.c +110 -111
- data/ext/libxml/ruby_xml_sax2_handler.c +326 -328
- data/ext/libxml/ruby_xml_schema.c +300 -301
- data/ext/libxml/ruby_xml_version.h +3 -3
- data/ext/libxml/ruby_xml_writer.c +34 -16
- data/ext/libxml/ruby_xml_xpath.c +188 -187
- data/ext/libxml/ruby_xml_xpath_context.c +360 -361
- data/ext/libxml/ruby_xml_xpath_object.c +335 -335
- data/libxml-ruby.gemspec +47 -44
- data/test/tc_attr.rb +5 -7
- data/test/tc_attr_decl.rb +5 -6
- data/test/tc_attributes.rb +1 -2
- data/test/tc_canonicalize.rb +1 -2
- data/test/tc_deprecated_require.rb +1 -2
- data/test/tc_document.rb +4 -5
- data/test/tc_document_write.rb +2 -3
- data/test/tc_dtd.rb +4 -5
- data/test/tc_encoding.rb +126 -126
- data/test/tc_encoding_sax.rb +4 -3
- data/test/tc_error.rb +14 -15
- data/test/tc_html_parser.rb +15 -7
- data/test/tc_html_parser_context.rb +1 -2
- data/test/tc_namespace.rb +2 -3
- data/test/tc_namespaces.rb +5 -6
- data/test/tc_node.rb +2 -3
- data/test/tc_node_cdata.rb +2 -3
- data/test/tc_node_comment.rb +1 -2
- data/test/tc_node_copy.rb +1 -2
- data/test/tc_node_edit.rb +5 -7
- data/test/tc_node_pi.rb +1 -2
- data/test/tc_node_text.rb +2 -3
- data/test/tc_node_write.rb +2 -3
- data/test/tc_node_xlink.rb +1 -2
- data/test/tc_parser.rb +18 -24
- data/test/tc_parser_context.rb +6 -7
- data/test/tc_properties.rb +1 -2
- data/test/tc_reader.rb +9 -10
- data/test/tc_relaxng.rb +4 -5
- data/test/tc_sax_parser.rb +9 -10
- data/test/tc_schema.rb +4 -5
- data/test/tc_traversal.rb +1 -2
- data/test/tc_writer.rb +1 -2
- data/test/tc_xinclude.rb +1 -2
- data/test/tc_xml.rb +1 -2
- data/test/tc_xpath.rb +8 -9
- data/test/tc_xpath_context.rb +3 -4
- data/test/tc_xpath_expression.rb +3 -4
- data/test/tc_xpointer.rb +1 -3
- data/test/test_helper.rb +3 -1
- data/test/test_suite.rb +0 -1
- metadata +90 -72
- data/test/etc_doc_to_s.rb +0 -21
- data/test/ets_doc_file.rb +0 -17
- data/test/ets_doc_to_s.rb +0 -23
- data/test/ets_gpx.rb +0 -28
- data/test/ets_node_gc.rb +0 -23
- data/test/ets_test.xml +0 -2
- data/test/ets_tsr.rb +0 -11
- data/test/model/kml_sample.xml +0 -915
- data/test/remove_test.rb +0 -9
- data/test/tc_gc.rb +0 -86
- data/test/tc_parser.rb.orig +0 -384
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
N2NiZTI5YmRkY2IzODEyZGNiYjAxZGExOWY2MTRhZGIxYTQ0MTcwNzlhZjE5
|
10
|
-
NjRlMGM1NzVjOTAxOTNlNjIwODIxNmNiZTlhZTVjNGQ2NDYzZDQ5Mzg3YmZm
|
11
|
-
MDZlNjViNDBiMTY4ZDgzZjc1MGEyYTczM2E0MDkxZDdmOTA3MDU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NDQ2MDNiZjRiZDg1YTg2Yjc0YjA0NzU5M2EwNzNhNTJmN2QyMzIzZDU3MWY2
|
14
|
-
OThmZmRiZTFmZWRmYmRjN2U2OTlmZTliZDljMjEzMWM0MDhjNmU2OWI3MTMy
|
15
|
-
YWZkZDM5NTI5MGExZGZjYjUyZDM4NDcyMGRmNjQxOTZhMDA5NmU=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 19bae1f5824f98a959ddf6f19674ac0f2a750388
|
4
|
+
data.tar.gz: 8a2003b0eed642100d6520306a3cf609b739b2a7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 730aeb8b63e92c5b362853b34df0e0cd84b502d5425f29a55722f74ddb1e98eabdc29f53d66bf5434460d96fe415e3e03c52aa3f3a024fb358f6b9d16bc7576e
|
7
|
+
data.tar.gz: a1585ebfe236cfa867b2a936836fb828783fe6d839d2ab03f45bd8ecaa77abec080a5e6480ce5357674de4803888fa0257db27b30d50fe3f9a3951f504ad14a9
|
data/HISTORY
CHANGED
@@ -1,18 +1,40 @@
|
|
1
1
|
= Release History
|
2
2
|
|
3
|
-
== 2.
|
4
|
-
|
5
|
-
*
|
6
|
-
* Fix
|
3
|
+
== 2.9.0 / 2016-06-13 Charlie Savage
|
4
|
+
|
5
|
+
* Revamp libxml-ruby's memory management to not cause crashes when used with Nokogiri (James Laird-Wah)
|
6
|
+
* Fix garbage collection issue that sometimes caused the library to hang (Charlie Savage)
|
7
|
+
* Improved multi-threading support (Charlie Savage)
|
8
|
+
* Fix crash sometimes caused by a xml node being being freed twice (Charlie Savage)
|
9
|
+
* Fix memory leak when setting the text content of a node (Charlie Savage)
|
10
|
+
* Set a default task in the Rakefile - use "test" (Robert Haines)
|
11
|
+
* Add "hanna_gudao" gem and add "rake-compiler" to develpoment dependencies (Robert Haines)
|
12
|
+
* Use Process.getrlimit instead of `ulimit` in the tests (Robert Haines)
|
13
|
+
* Build on smartos (Steven Williamson)
|
14
|
+
* Fix compiler warnings (Charlie Savage)
|
15
|
+
* Add Xcode project for easier debugging on OSX (Charlie Savage)
|
16
|
+
* Switch from unit test to minitest (Charlie Savage)
|
17
|
+
|
18
|
+
== 2.8.0 / 2015-01-09 Charlie Savage
|
19
|
+
|
20
|
+
* Use RbConfig instead of Config in extconf.rb (Robert Haines)
|
21
|
+
* Correct xpath documentation XML (Bill Mill)
|
22
|
+
* Correct from_string method documentation (Bill Mill)
|
23
|
+
* Fix compile error with debug not enabled in libxml (Patrick Ziegler)
|
24
|
+
* Update gemspec to include license (Charlie Savage)
|
25
|
+
* In XML::Writer prevent writing to io while being GCed (Brett Gibson)
|
26
|
+
|
27
|
+
== 2.7.0 / 2013-08-13 Charlie Savage
|
28
|
+
|
29
|
+
* Don't call rb_warning in GC mark function (Dirkjan Bussink)
|
7
30
|
* Set libxml error handler when a libxml-ruby error handler is set (Geoffrey Giesemann)
|
8
|
-
* Fix tests for nil TypeErrors (Geoffrey Giesemann)
|
9
|
-
* Fix segmentation fault for issue #62
|
10
|
-
|
11
|
-
*
|
12
|
-
* Fix
|
13
|
-
* Fix XML::Writer.set_quote_char UT, wrong expected string (#63). (julp)
|
31
|
+
* Fix tests for nil TypeErrors for ruby 2.0=< (Geoffrey Giesemann)
|
32
|
+
* Fix segmentation fault for issue #62 (Charlie Savage)
|
33
|
+
* Add #node_type method to dtd (Charlie Savage)
|
34
|
+
* Fixing equality check of LibXML::XML::Error against other objects (Michał Szajbe)
|
35
|
+
* Fix #63, XML::Writer.set_quote_char UT, wrong expected string (julp)
|
14
36
|
* Fix potential segfault when GC occurs while creating ns from xpath (Timothy Elliott)
|
15
|
-
* Fix segmentation fault after
|
37
|
+
* Fix for #59, segmentation fault after failure to load external schema (Clifford Heath)
|
16
38
|
|
17
39
|
== 2.6.0 / 2013-02-16 Charlie Savage
|
18
40
|
|
data/README.rdoc
CHANGED
@@ -31,8 +31,8 @@ The easiest way to install libxml-ruby is via Ruby Gems. To install:
|
|
31
31
|
|
32
32
|
If you are running Windows, make sure to install the Win32 RubyGem
|
33
33
|
which includes prebuilt extensions for Ruby 1.8, 1.9 and 2.0 preview. These
|
34
|
-
extensions are built
|
35
|
-
iconv version 1.
|
34
|
+
extensions are built using MinGW64 and libxml2 version 2.9.3,
|
35
|
+
iconv version 1.14 and zlib version 1.2.8. Note these binaries
|
36
36
|
are available in the lib\libs directory. To use them, put them
|
37
37
|
someplace on your path.
|
38
38
|
|
@@ -114,8 +114,8 @@ For simplicity's sake, the documentation uses the xml module in its examples.
|
|
114
114
|
|
115
115
|
== Memory Management
|
116
116
|
libxml-ruby automatically manages memory associated with the
|
117
|
-
underlying libxml2 library.
|
118
|
-
your code must handle.
|
117
|
+
underlying libxml2 library. There is however one corner case that
|
118
|
+
your code must handle. If a node is imported into a document, but not
|
119
119
|
added to the document, a segmentation fault may occur on program termination.
|
120
120
|
|
121
121
|
# Do NOT do this
|
@@ -124,8 +124,8 @@ added to the document, a segmentation fault may occur on program termination.
|
|
124
124
|
doc2 = XML::Document.string("test2")
|
125
125
|
node = doc2.import(doc1.root)
|
126
126
|
|
127
|
-
If doc2 is freed before
|
128
|
-
|
127
|
+
If doc2 is freed before the node a segmentation fault will occur since
|
128
|
+
the node references the document. To avoid this, simply make sure to add the
|
129
129
|
node to the document:
|
130
130
|
|
131
131
|
# DO this instead
|
@@ -133,7 +133,7 @@ node to the document:
|
|
133
133
|
doc2 = XML::Document.string("test2")
|
134
134
|
doc2.root << doc2.import(doc1.root)
|
135
135
|
|
136
|
-
Alternatively, you can call
|
136
|
+
Alternatively, you can call node.remove! to disassociate the node from doc2.
|
137
137
|
|
138
138
|
== Threading
|
139
139
|
libxml-ruby fully supports native, background Ruby threads. This of course
|
data/Rakefile
CHANGED
@@ -1,78 +1,81 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "rubygems"
|
4
|
-
require "rake/extensiontask"
|
5
|
-
require "rake/testtask"
|
6
|
-
require "rubygems/package_task"
|
7
|
-
require "rdoc/task"
|
8
|
-
require "yaml"
|
9
|
-
|
10
|
-
GEM_NAME = "libxml-ruby"
|
11
|
-
SO_NAME = "libxml_ruby"
|
12
|
-
|
13
|
-
# Read the spec file
|
14
|
-
spec = Gem::Specification.load("#{GEM_NAME}.gemspec")
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
ext.
|
21
|
-
ext.
|
22
|
-
ext.
|
23
|
-
ext.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
win_spec
|
41
|
-
win_spec.
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
RDoc
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
rdoc.
|
60
|
-
rdoc.
|
61
|
-
|
62
|
-
#
|
63
|
-
rdoc.
|
64
|
-
rdoc.
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
'
|
69
|
-
'
|
70
|
-
'
|
71
|
-
'
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "rake/extensiontask"
|
5
|
+
require "rake/testtask"
|
6
|
+
require "rubygems/package_task"
|
7
|
+
require "rdoc/task"
|
8
|
+
require "yaml"
|
9
|
+
|
10
|
+
GEM_NAME = "libxml-ruby"
|
11
|
+
SO_NAME = "libxml_ruby"
|
12
|
+
|
13
|
+
# Read the spec file
|
14
|
+
spec = Gem::Specification.load("#{GEM_NAME}.gemspec")
|
15
|
+
|
16
|
+
task :default => [:test]
|
17
|
+
|
18
|
+
# Setup compile tasks
|
19
|
+
Rake::ExtensionTask.new do |ext|
|
20
|
+
ext.gem_spec = spec
|
21
|
+
ext.name = SO_NAME
|
22
|
+
ext.ext_dir = "ext/libxml"
|
23
|
+
ext.lib_dir = "lib/#{RUBY_VERSION.sub(/\.\d$/, '')}"
|
24
|
+
ext.config_options << "--with-xml2-include=C:/msys64/mingw64/include/libxml2"
|
25
|
+
ext.config_options << "--with-zlib-dir=C:/msys64/mingw64"
|
26
|
+
end
|
27
|
+
|
28
|
+
# Setup generic gem
|
29
|
+
Gem::PackageTask.new(spec) do |pkg|
|
30
|
+
pkg.package_dir = 'pkg'
|
31
|
+
pkg.need_tar = false
|
32
|
+
end
|
33
|
+
|
34
|
+
# Setup Windows Gem
|
35
|
+
if RUBY_PLATFORM.match(/win32|mingw32/)
|
36
|
+
binaries = (FileList['lib/**/*.so',
|
37
|
+
'lib/**/*dll'])
|
38
|
+
|
39
|
+
# Windows specification
|
40
|
+
win_spec = spec.clone
|
41
|
+
win_spec.platform = Gem::Platform::CURRENT
|
42
|
+
win_spec.files += binaries.to_a
|
43
|
+
win_spec.instance_variable_set(:@cache_file, nil)
|
44
|
+
|
45
|
+
# Unset extensions
|
46
|
+
win_spec.extensions = nil
|
47
|
+
|
48
|
+
# Rake task to build the windows package
|
49
|
+
Gem::PackageTask.new(win_spec) do |pkg|
|
50
|
+
pkg.package_dir = 'pkg'
|
51
|
+
pkg.need_tar = false
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# RDoc Task
|
56
|
+
desc 'Generate rdoc documentation'
|
57
|
+
RDoc::Task.new("rdoc") do |rdoc|
|
58
|
+
rdoc.rdoc_dir = 'website/_site/rdoc'
|
59
|
+
rdoc.title = 'LibXML'
|
60
|
+
rdoc.generator = 'hanna'
|
61
|
+
|
62
|
+
# Show source inline with line numbers
|
63
|
+
rdoc.options << '--line-numbers'
|
64
|
+
rdoc.options << '--charset=utf-8'
|
65
|
+
# Make the readme file the start page for the generated html
|
66
|
+
rdoc.main = 'README.rdoc'
|
67
|
+
rdoc.rdoc_files.include('doc/*.rdoc',
|
68
|
+
'ext/**/libxml.c',
|
69
|
+
'ext/**/ruby_xml.c',
|
70
|
+
'ext/**/*.c',
|
71
|
+
'lib/**/*.rb',
|
72
|
+
'README.rdoc',
|
73
|
+
'HISTORY',
|
74
|
+
'LICENSE')
|
75
|
+
end
|
76
|
+
|
77
|
+
# Test Task
|
78
|
+
Rake::TestTask.new do |t|
|
79
|
+
t.libs << "test"
|
80
|
+
t.verbose = true
|
78
81
|
end
|
data/ext/libxml/extconf.h
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
#ifndef EXTCONF_H
|
2
|
-
#define EXTCONF_H
|
3
|
-
#define
|
4
|
-
#
|
5
|
-
#endif
|
1
|
+
#ifndef EXTCONF_H
|
2
|
+
#define EXTCONF_H
|
3
|
+
#define HAVE_RB_IO_BUFWRITE 1
|
4
|
+
#endif
|
data/ext/libxml/extconf.rb
CHANGED
@@ -1,118 +1,57 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require '
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
crash(<<EOL)
|
59
|
-
need libiconv.
|
60
|
-
|
61
|
-
Install the libiconv or try passing one of the following options
|
62
|
-
to extconf.rb:
|
63
|
-
|
64
|
-
--with-iconv-dir=/path/to/iconv
|
65
|
-
--with-iconv-lib=/path/to/iconv/lib
|
66
|
-
--with-iconv-include=/path/to/iconv/include
|
67
|
-
EOL
|
68
|
-
end
|
69
|
-
|
70
|
-
if (xc = with_config('xml2-config')) or RUBY_PLATFORM.match(/darwin/i) then
|
71
|
-
xc = 'xml2-config' if xc == true or xc.nil?
|
72
|
-
cflags = `#{xc} --cflags`.chomp
|
73
|
-
if $? != 0
|
74
|
-
cflags = nil
|
75
|
-
else
|
76
|
-
libs = `#{xc} --libs`.chomp
|
77
|
-
if $? != 0
|
78
|
-
libs = nil
|
79
|
-
else
|
80
|
-
$CFLAGS += ' ' + cflags
|
81
|
-
$libs = libs + " " + $libs
|
82
|
-
end
|
83
|
-
end
|
84
|
-
else
|
85
|
-
dir_config('xml2')
|
86
|
-
end
|
87
|
-
|
88
|
-
unless (have_library('xml2', 'xmlParseDoc') or
|
89
|
-
have_library('libxml2', 'xmlParseDoc') or
|
90
|
-
find_library('xml2', 'xmlParseDoc', '/opt/lib', '/usr/local/lib', '/usr/lib')) and
|
91
|
-
(have_header('libxml/xmlversion.h') or
|
92
|
-
find_header('libxml/xmlversion.h',
|
93
|
-
'/opt/include/libxml2',
|
94
|
-
'/usr/local/include/libxml2',
|
95
|
-
'/usr/include/libxml2'))
|
96
|
-
crash(<<EOL)
|
97
|
-
need libxml2.
|
98
|
-
|
99
|
-
Install the library or try one of the following options to extconf.rb:
|
100
|
-
|
101
|
-
--with-xml2-config=/path/to/xml2-config
|
102
|
-
--with-xml2-dir=/path/to/libxml2
|
103
|
-
--with-xml2-lib=/path/to/libxml2/lib
|
104
|
-
--with-xml2-include=/path/to/libxml2/include
|
105
|
-
EOL
|
106
|
-
end
|
107
|
-
|
108
|
-
have_func('rb_io_bufwrite', 'ruby/io.h')
|
109
|
-
|
110
|
-
# For FreeBSD add /usr/local/include
|
111
|
-
$INCFLAGS << " -I/usr/local/include"
|
112
|
-
|
113
|
-
$CFLAGS << ' ' << $INCFLAGS
|
114
|
-
|
115
|
-
#$INSTALLFILES = [["libxml.rb", "$(RUBYLIBDIR)", "../xml"]]
|
116
|
-
|
117
|
-
create_header()
|
118
|
-
create_makefile('libxml_ruby')
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'mkmf'
|
4
|
+
|
5
|
+
def crash(str)
|
6
|
+
printf(" extconf failure: %s\n", str)
|
7
|
+
exit 1
|
8
|
+
end
|
9
|
+
|
10
|
+
xc = with_config('xml2-config')
|
11
|
+
if xc
|
12
|
+
cflags = `#{xc} --cflags`.chomp
|
13
|
+
if $? != 0
|
14
|
+
cflags = nil
|
15
|
+
else
|
16
|
+
libs = `#{xc} --libs`.chomp
|
17
|
+
if $? != 0
|
18
|
+
libs = nil
|
19
|
+
else
|
20
|
+
$CFLAGS += ' ' + cflags
|
21
|
+
$libs = libs + " " + $libs
|
22
|
+
end
|
23
|
+
end
|
24
|
+
else
|
25
|
+
dir_config('xml2')
|
26
|
+
end
|
27
|
+
|
28
|
+
unless find_header('libxml/xmlversion.h',
|
29
|
+
'/opt/include/libxml2',
|
30
|
+
'/opt/local/include/libxml2',
|
31
|
+
'/usr/local/include/libxml2',
|
32
|
+
'/usr/include/libxml2') &&
|
33
|
+
find_library('xml2', 'xmlParseDoc',
|
34
|
+
'/opt/lib',
|
35
|
+
'/opt/local/lib',
|
36
|
+
'/usr/local/lib',
|
37
|
+
'/usr/lib')
|
38
|
+
crash(<<EOL)
|
39
|
+
need libxml2.
|
40
|
+
|
41
|
+
Install the library or try one of the following options to extconf.rb:
|
42
|
+
|
43
|
+
--with-xml2-config=/path/to/xml2-config
|
44
|
+
--with-xml2-dir=/path/to/libxml2
|
45
|
+
--with-xml2-lib=/path/to/libxml2/lib
|
46
|
+
--with-xml2-include=/path/to/libxml2/include
|
47
|
+
EOL
|
48
|
+
end
|
49
|
+
|
50
|
+
have_func('rb_io_bufwrite', 'ruby/io.h')
|
51
|
+
|
52
|
+
# For FreeBSD add /usr/local/include
|
53
|
+
$INCFLAGS << " -I/usr/local/include"
|
54
|
+
$CFLAGS << ' ' << $INCFLAGS
|
55
|
+
|
56
|
+
create_header()
|
57
|
+
create_makefile('libxml_ruby')
|
data/ext/libxml/libxml.c
CHANGED
@@ -39,6 +39,10 @@ void Init_libxml_ruby(void)
|
|
39
39
|
* Refer to the README file to get started and the LICENSE file for
|
40
40
|
* copyright and distribution information.
|
41
41
|
*/
|
42
|
+
|
43
|
+
// Seutp for threading. http://xmlsoft.org/threads.html
|
44
|
+
xmlInitParser();
|
45
|
+
|
42
46
|
mLibXML = rb_define_module("LibXML");
|
43
47
|
|
44
48
|
rxml_init_memory();
|