coupa-libxml-ruby 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. data/CHANGES +488 -0
  2. data/LICENSE +22 -0
  3. data/README +161 -0
  4. data/Rakefile +188 -0
  5. data/doc/css/normal.css +182 -0
  6. data/doc/img/raze-tiny.png +0 -0
  7. data/doc/img/red-cube.jpg +0 -0
  8. data/doc/img/xml-ruby.png +0 -0
  9. data/doc/index.xml +43 -0
  10. data/doc/install.xml +77 -0
  11. data/doc/layout.rhtml +38 -0
  12. data/doc/layout.xsl +67 -0
  13. data/doc/license.xml +32 -0
  14. data/doc/log/changelog.xml +1324 -0
  15. data/doc/log/changelog.xsl +42 -0
  16. data/doc/rdoc/classes/LibXML.html +207 -0
  17. data/doc/rdoc/classes/LibXML/XML.html +407 -0
  18. data/doc/rdoc/classes/LibXML/XML/Attr.html +521 -0
  19. data/doc/rdoc/classes/LibXML/XML/AttrDecl.html +360 -0
  20. data/doc/rdoc/classes/LibXML/XML/Attributes.html +149 -0
  21. data/doc/rdoc/classes/LibXML/XML/Document.html +460 -0
  22. data/doc/rdoc/classes/LibXML/XML/Error.html +129 -0
  23. data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +263 -0
  24. data/doc/rdoc/classes/LibXML/XML/Namespace.html +248 -0
  25. data/doc/rdoc/classes/LibXML/XML/Namespaces.html +200 -0
  26. data/doc/rdoc/classes/LibXML/XML/Node.html +1351 -0
  27. data/doc/rdoc/classes/LibXML/XML/Parser.html +328 -0
  28. data/doc/rdoc/classes/LibXML/XML/Reader.html +172 -0
  29. data/doc/rdoc/classes/LibXML/XML/SaxParser.html +232 -0
  30. data/doc/rdoc/classes/LibXML/XML/SaxParser/Callbacks.html +506 -0
  31. data/doc/rdoc/classes/LibXML/XML/SaxParser/VerboseCallbacks.html +555 -0
  32. data/doc/rdoc/classes/LibXML/XML/XPath.html +111 -0
  33. data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +162 -0
  34. data/doc/rdoc/classes/cXMLDtd.html +114 -0
  35. data/doc/rdoc/classes/cXMLNode.html +114 -0
  36. data/doc/rdoc/created.rid +1 -0
  37. data/doc/rdoc/files/CHANGES.html +794 -0
  38. data/doc/rdoc/files/LICENSE.html +131 -0
  39. data/doc/rdoc/files/README.html +343 -0
  40. data/doc/rdoc/files/ext/libxml/libxml_c.html +101 -0
  41. data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +101 -0
  42. data/doc/rdoc/files/ext/libxml/ruby_xml_attr_decl_c.html +101 -0
  43. data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +101 -0
  44. data/doc/rdoc/files/ext/libxml/ruby_xml_c.html +101 -0
  45. data/doc/rdoc/files/ext/libxml/ruby_xml_cbg_c.html +101 -0
  46. data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +101 -0
  47. data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +101 -0
  48. data/doc/rdoc/files/ext/libxml/ruby_xml_encoding_c.html +101 -0
  49. data/doc/rdoc/files/ext/libxml/ruby_xml_error_c.html +101 -0
  50. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +101 -0
  51. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_context_c.html +101 -0
  52. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_options_c.html +101 -0
  53. data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +101 -0
  54. data/doc/rdoc/files/ext/libxml/ruby_xml_io_c.html +101 -0
  55. data/doc/rdoc/files/ext/libxml/ruby_xml_namespace_c.html +101 -0
  56. data/doc/rdoc/files/ext/libxml/ruby_xml_namespaces_c.html +101 -0
  57. data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +101 -0
  58. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +101 -0
  59. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +101 -0
  60. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_options_c.html +101 -0
  61. data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +101 -0
  62. data/doc/rdoc/files/ext/libxml/ruby_xml_relaxng_c.html +101 -0
  63. data/doc/rdoc/files/ext/libxml/ruby_xml_sax2_handler_c.html +101 -0
  64. data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +101 -0
  65. data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +101 -0
  66. data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +101 -0
  67. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +101 -0
  68. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +101 -0
  69. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_expression_c.html +101 -0
  70. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +101 -0
  71. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +101 -0
  72. data/doc/rdoc/files/lib/libxml/attr_decl_rb.html +101 -0
  73. data/doc/rdoc/files/lib/libxml/attr_rb.html +101 -0
  74. data/doc/rdoc/files/lib/libxml/attributes_rb.html +101 -0
  75. data/doc/rdoc/files/lib/libxml/document_rb.html +101 -0
  76. data/doc/rdoc/files/lib/libxml/error_rb.html +101 -0
  77. data/doc/rdoc/files/lib/libxml/hpricot_rb.html +192 -0
  78. data/doc/rdoc/files/lib/libxml/html_parser_rb.html +101 -0
  79. data/doc/rdoc/files/lib/libxml/namespace_rb.html +101 -0
  80. data/doc/rdoc/files/lib/libxml/namespaces_rb.html +101 -0
  81. data/doc/rdoc/files/lib/libxml/node_rb.html +108 -0
  82. data/doc/rdoc/files/lib/libxml/ns_rb.html +101 -0
  83. data/doc/rdoc/files/lib/libxml/parser_rb.html +101 -0
  84. data/doc/rdoc/files/lib/libxml/properties_rb.html +101 -0
  85. data/doc/rdoc/files/lib/libxml/reader_rb.html +101 -0
  86. data/doc/rdoc/files/lib/libxml/sax_callbacks_rb.html +101 -0
  87. data/doc/rdoc/files/lib/libxml/sax_parser_rb.html +101 -0
  88. data/doc/rdoc/files/lib/libxml/tree_rb.html +101 -0
  89. data/doc/rdoc/files/lib/libxml/xpath_object_rb.html +101 -0
  90. data/doc/rdoc/files/lib/libxml_rb.html +133 -0
  91. data/doc/rdoc/files/lib/xml/libxml_rb.html +124 -0
  92. data/doc/rdoc/files/lib/xml_rb.html +134 -0
  93. data/doc/rdoc/fr_class_index.html +46 -0
  94. data/doc/rdoc/fr_file_index.html +84 -0
  95. data/doc/rdoc/fr_method_index.html +155 -0
  96. data/doc/rdoc/index.html +24 -0
  97. data/doc/rdoc/rdoc-style.css +208 -0
  98. data/ext/libxml/Makefile +157 -0
  99. data/ext/libxml/build.log +4 -0
  100. data/ext/libxml/extconf.h +5 -0
  101. data/ext/libxml/extconf.rb +278 -0
  102. data/ext/libxml/libxml.c +77 -0
  103. data/ext/libxml/libxml.o +0 -0
  104. data/ext/libxml/libxml_ruby.bundle +0 -0
  105. data/ext/libxml/mkmf.log +228 -0
  106. data/ext/libxml/ruby_libxml.h +93 -0
  107. data/ext/libxml/ruby_xml.c +893 -0
  108. data/ext/libxml/ruby_xml.h +10 -0
  109. data/ext/libxml/ruby_xml.o +0 -0
  110. data/ext/libxml/ruby_xml_attr.c +352 -0
  111. data/ext/libxml/ruby_xml_attr.h +14 -0
  112. data/ext/libxml/ruby_xml_attr.o +0 -0
  113. data/ext/libxml/ruby_xml_attr_decl.c +171 -0
  114. data/ext/libxml/ruby_xml_attr_decl.h +13 -0
  115. data/ext/libxml/ruby_xml_attr_decl.o +0 -0
  116. data/ext/libxml/ruby_xml_attributes.c +277 -0
  117. data/ext/libxml/ruby_xml_attributes.h +17 -0
  118. data/ext/libxml/ruby_xml_attributes.o +0 -0
  119. data/ext/libxml/ruby_xml_cbg.c +86 -0
  120. data/ext/libxml/ruby_xml_cbg.o +0 -0
  121. data/ext/libxml/ruby_xml_document.c +1006 -0
  122. data/ext/libxml/ruby_xml_document.c.old +936 -0
  123. data/ext/libxml/ruby_xml_document.h +17 -0
  124. data/ext/libxml/ruby_xml_document.o +0 -0
  125. data/ext/libxml/ruby_xml_dtd.c +257 -0
  126. data/ext/libxml/ruby_xml_dtd.h +9 -0
  127. data/ext/libxml/ruby_xml_dtd.o +0 -0
  128. data/ext/libxml/ruby_xml_encoding.c +134 -0
  129. data/ext/libxml/ruby_xml_encoding.h +12 -0
  130. data/ext/libxml/ruby_xml_encoding.o +0 -0
  131. data/ext/libxml/ruby_xml_error.c +1004 -0
  132. data/ext/libxml/ruby_xml_error.h +14 -0
  133. data/ext/libxml/ruby_xml_error.o +0 -0
  134. data/ext/libxml/ruby_xml_html_parser.c +92 -0
  135. data/ext/libxml/ruby_xml_html_parser.h +12 -0
  136. data/ext/libxml/ruby_xml_html_parser.o +0 -0
  137. data/ext/libxml/ruby_xml_html_parser_context.c +308 -0
  138. data/ext/libxml/ruby_xml_html_parser_context.h +12 -0
  139. data/ext/libxml/ruby_xml_html_parser_context.o +0 -0
  140. data/ext/libxml/ruby_xml_html_parser_options.c +40 -0
  141. data/ext/libxml/ruby_xml_html_parser_options.h +12 -0
  142. data/ext/libxml/ruby_xml_html_parser_options.o +0 -0
  143. data/ext/libxml/ruby_xml_input_cbg.c +191 -0
  144. data/ext/libxml/ruby_xml_input_cbg.h +20 -0
  145. data/ext/libxml/ruby_xml_input_cbg.o +0 -0
  146. data/ext/libxml/ruby_xml_io.c +30 -0
  147. data/ext/libxml/ruby_xml_io.h +9 -0
  148. data/ext/libxml/ruby_xml_io.o +0 -0
  149. data/ext/libxml/ruby_xml_namespace.c +170 -0
  150. data/ext/libxml/ruby_xml_namespace.h +12 -0
  151. data/ext/libxml/ruby_xml_namespace.o +0 -0
  152. data/ext/libxml/ruby_xml_namespaces.c +295 -0
  153. data/ext/libxml/ruby_xml_namespaces.h +11 -0
  154. data/ext/libxml/ruby_xml_namespaces.o +0 -0
  155. data/ext/libxml/ruby_xml_node.c +1386 -0
  156. data/ext/libxml/ruby_xml_node.h +13 -0
  157. data/ext/libxml/ruby_xml_node.o +0 -0
  158. data/ext/libxml/ruby_xml_parser.c +94 -0
  159. data/ext/libxml/ruby_xml_parser.h +14 -0
  160. data/ext/libxml/ruby_xml_parser.o +0 -0
  161. data/ext/libxml/ruby_xml_parser_context.c +982 -0
  162. data/ext/libxml/ruby_xml_parser_context.h +12 -0
  163. data/ext/libxml/ruby_xml_parser_context.o +0 -0
  164. data/ext/libxml/ruby_xml_parser_options.c +68 -0
  165. data/ext/libxml/ruby_xml_parser_options.h +14 -0
  166. data/ext/libxml/ruby_xml_parser_options.o +0 -0
  167. data/ext/libxml/ruby_xml_reader.c +1002 -0
  168. data/ext/libxml/ruby_xml_reader.h +14 -0
  169. data/ext/libxml/ruby_xml_reader.o +0 -0
  170. data/ext/libxml/ruby_xml_relaxng.c +111 -0
  171. data/ext/libxml/ruby_xml_relaxng.h +10 -0
  172. data/ext/libxml/ruby_xml_relaxng.o +0 -0
  173. data/ext/libxml/ruby_xml_sax2_handler.c +322 -0
  174. data/ext/libxml/ruby_xml_sax2_handler.h +12 -0
  175. data/ext/libxml/ruby_xml_sax2_handler.o +0 -0
  176. data/ext/libxml/ruby_xml_sax_parser.c +137 -0
  177. data/ext/libxml/ruby_xml_sax_parser.h +12 -0
  178. data/ext/libxml/ruby_xml_sax_parser.o +0 -0
  179. data/ext/libxml/ruby_xml_schema.c +159 -0
  180. data/ext/libxml/ruby_xml_schema.h +11 -0
  181. data/ext/libxml/ruby_xml_schema.o +0 -0
  182. data/ext/libxml/ruby_xml_version.h +9 -0
  183. data/ext/libxml/ruby_xml_xinclude.c +18 -0
  184. data/ext/libxml/ruby_xml_xinclude.h +13 -0
  185. data/ext/libxml/ruby_xml_xinclude.o +0 -0
  186. data/ext/libxml/ruby_xml_xpath.c +107 -0
  187. data/ext/libxml/ruby_xml_xpath.h +12 -0
  188. data/ext/libxml/ruby_xml_xpath.o +0 -0
  189. data/ext/libxml/ruby_xml_xpath_context.c +387 -0
  190. data/ext/libxml/ruby_xml_xpath_context.h +11 -0
  191. data/ext/libxml/ruby_xml_xpath_context.o +0 -0
  192. data/ext/libxml/ruby_xml_xpath_expression.c +83 -0
  193. data/ext/libxml/ruby_xml_xpath_expression.h +12 -0
  194. data/ext/libxml/ruby_xml_xpath_expression.o +0 -0
  195. data/ext/libxml/ruby_xml_xpath_object.c +336 -0
  196. data/ext/libxml/ruby_xml_xpath_object.h +19 -0
  197. data/ext/libxml/ruby_xml_xpath_object.o +0 -0
  198. data/ext/libxml/ruby_xml_xpointer.c +101 -0
  199. data/ext/libxml/ruby_xml_xpointer.h +13 -0
  200. data/ext/libxml/ruby_xml_xpointer.o +0 -0
  201. data/ext/mingw/Rakefile +34 -0
  202. data/ext/mingw/build.rake +41 -0
  203. data/ext/vc/libxml_ruby.sln +26 -0
  204. data/lib/libxml.rb +30 -0
  205. data/lib/libxml/attr.rb +111 -0
  206. data/lib/libxml/attr_decl.rb +78 -0
  207. data/lib/libxml/attributes.rb +12 -0
  208. data/lib/libxml/document.rb +190 -0
  209. data/lib/libxml/error.rb +88 -0
  210. data/lib/libxml/hpricot.rb +76 -0
  211. data/lib/libxml/html_parser.rb +94 -0
  212. data/lib/libxml/namespace.rb +60 -0
  213. data/lib/libxml/namespaces.rb +36 -0
  214. data/lib/libxml/node.rb +385 -0
  215. data/lib/libxml/ns.rb +20 -0
  216. data/lib/libxml/parser.rb +365 -0
  217. data/lib/libxml/properties.rb +21 -0
  218. data/lib/libxml/reader.rb +27 -0
  219. data/lib/libxml/sax_callbacks.rb +178 -0
  220. data/lib/libxml/sax_parser.rb +56 -0
  221. data/lib/libxml/tree.rb +27 -0
  222. data/lib/libxml/xpath_object.rb +14 -0
  223. data/lib/xml.rb +14 -0
  224. data/lib/xml/libxml.rb +8 -0
  225. data/setup.rb +1585 -0
  226. data/test/etc_doc_to_s.rb +19 -0
  227. data/test/ets_doc_file.rb +15 -0
  228. data/test/ets_doc_to_s.rb +21 -0
  229. data/test/ets_gpx.rb +26 -0
  230. data/test/ets_node_gc.rb +21 -0
  231. data/test/ets_test.xml +2 -0
  232. data/test/ets_tsr.rb +9 -0
  233. data/test/model/atom.xml +13 -0
  234. data/test/model/bands.xml +5 -0
  235. data/test/model/books.xml +146 -0
  236. data/test/model/merge_bug_data.xml +58 -0
  237. data/test/model/ruby-lang.html +238 -0
  238. data/test/model/rubynet.xml +79 -0
  239. data/test/model/rubynet_project +1 -0
  240. data/test/model/shiporder.rnc +28 -0
  241. data/test/model/shiporder.rng +86 -0
  242. data/test/model/shiporder.xml +23 -0
  243. data/test/model/shiporder.xsd +31 -0
  244. data/test/model/soap.xml +27 -0
  245. data/test/model/xinclude.xml +5 -0
  246. data/test/tc_attr.rb +170 -0
  247. data/test/tc_attr_decl.rb +131 -0
  248. data/test/tc_attributes.rb +133 -0
  249. data/test/tc_deprecated_require.rb +11 -0
  250. data/test/tc_document.rb +113 -0
  251. data/test/tc_document_write.rb +118 -0
  252. data/test/tc_dtd.rb +123 -0
  253. data/test/tc_error.rb +136 -0
  254. data/test/tc_html_parser.rb +138 -0
  255. data/test/tc_namespace.rb +59 -0
  256. data/test/tc_namespaces.rb +174 -0
  257. data/test/tc_node.rb +181 -0
  258. data/test/tc_node_cdata.rb +49 -0
  259. data/test/tc_node_comment.rb +30 -0
  260. data/test/tc_node_copy.rb +40 -0
  261. data/test/tc_node_edit.rb +158 -0
  262. data/test/tc_node_text.rb +69 -0
  263. data/test/tc_node_write.rb +83 -0
  264. data/test/tc_node_xlink.rb +26 -0
  265. data/test/tc_parser.rb +330 -0
  266. data/test/tc_parser_context.rb +186 -0
  267. data/test/tc_properties.rb +36 -0
  268. data/test/tc_reader.rb +284 -0
  269. data/test/tc_relaxng.rb +51 -0
  270. data/test/tc_sax_parser.rb +274 -0
  271. data/test/tc_schema.rb +51 -0
  272. data/test/tc_traversal.rb +220 -0
  273. data/test/tc_xinclude.rb +19 -0
  274. data/test/tc_xml.rb +224 -0
  275. data/test/tc_xpath.rb +193 -0
  276. data/test/tc_xpath_context.rb +78 -0
  277. data/test/tc_xpath_expression.rb +35 -0
  278. data/test/tc_xpointer.rb +72 -0
  279. data/test/test_suite.rb +33 -0
  280. metadata +376 -0
Binary file
@@ -0,0 +1,228 @@
1
+ have_library: checking for socket() in -lsocket... -------------------- no
2
+
3
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lsocket -lpthread -ldl -lobjc "
4
+ conftest.c: In function ‘t’:
5
+ conftest.c:3: error: ‘socket’ undeclared (first use in this function)
6
+ conftest.c:3: error: (Each undeclared identifier is reported only once
7
+ conftest.c:3: error: for each function it appears in.)
8
+ checked program was:
9
+ /* begin */
10
+ 1: /*top*/
11
+ 2: int main() { return 0; }
12
+ 3: int t() { void ((*volatile p)()); p = (void ((*)()))socket; return 0; }
13
+ /* end */
14
+
15
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lsocket -lpthread -ldl -lobjc "
16
+ ld: library not found for -lsocket
17
+ collect2: ld returned 1 exit status
18
+ checked program was:
19
+ /* begin */
20
+ 1: /*top*/
21
+ 2: int main() { return 0; }
22
+ 3: int t() { socket(); return 0; }
23
+ /* end */
24
+
25
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lsocket -lpthread -ldl -lobjc "
26
+ ld: library not found for -lsocket
27
+ collect2: ld returned 1 exit status
28
+ checked program was:
29
+ /* begin */
30
+ 1: int socket();
31
+ 2: /*top*/
32
+ 3: /*
33
+ 4: * http://trac.macports.org/ticket/3604
34
+ 5: * gcc 4.0 on 10.4 has a problem
35
+ 6: */
36
+ 7: int main() { return 0; }
37
+ 8: int t() { socket(); return 0; }
38
+ /* end */
39
+
40
+ --------------------
41
+
42
+ have_library: checking for gethostbyname() in -lnsl... -------------------- no
43
+
44
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lnsl -lpthread -ldl -lobjc "
45
+ conftest.c: In function ‘t’:
46
+ conftest.c:3: error: ‘gethostbyname’ undeclared (first use in this function)
47
+ conftest.c:3: error: (Each undeclared identifier is reported only once
48
+ conftest.c:3: error: for each function it appears in.)
49
+ checked program was:
50
+ /* begin */
51
+ 1: /*top*/
52
+ 2: int main() { return 0; }
53
+ 3: int t() { void ((*volatile p)()); p = (void ((*)()))gethostbyname; return 0; }
54
+ /* end */
55
+
56
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lnsl -lpthread -ldl -lobjc "
57
+ ld: library not found for -lnsl
58
+ collect2: ld returned 1 exit status
59
+ checked program was:
60
+ /* begin */
61
+ 1: /*top*/
62
+ 2: int main() { return 0; }
63
+ 3: int t() { gethostbyname(); return 0; }
64
+ /* end */
65
+
66
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lnsl -lpthread -ldl -lobjc "
67
+ ld: library not found for -lnsl
68
+ collect2: ld returned 1 exit status
69
+ checked program was:
70
+ /* begin */
71
+ 1: int gethostbyname();
72
+ 2: /*top*/
73
+ 3: /*
74
+ 4: * http://trac.macports.org/ticket/3604
75
+ 5: * gcc 4.0 on 10.4 has a problem
76
+ 6: */
77
+ 7: int main() { return 0; }
78
+ 8: int t() { gethostbyname(); return 0; }
79
+ /* end */
80
+
81
+ --------------------
82
+
83
+ have_library: checking for atan() in -lm... -------------------- yes
84
+
85
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lm -lpthread -ldl -lobjc "
86
+ conftest.c: In function ‘t’:
87
+ conftest.c:3: error: ‘atan’ undeclared (first use in this function)
88
+ conftest.c:3: error: (Each undeclared identifier is reported only once
89
+ conftest.c:3: error: for each function it appears in.)
90
+ checked program was:
91
+ /* begin */
92
+ 1: /*top*/
93
+ 2: int main() { return 0; }
94
+ 3: int t() { void ((*volatile p)()); p = (void ((*)()))atan; return 0; }
95
+ /* end */
96
+
97
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lm -lpthread -ldl -lobjc "
98
+ conftest.c: In function ‘t’:
99
+ conftest.c:3: warning: incompatible implicit declaration of built-in function ‘atan’
100
+ conftest.c:3: error: too few arguments to function ‘atan’
101
+ checked program was:
102
+ /* begin */
103
+ 1: /*top*/
104
+ 2: int main() { return 0; }
105
+ 3: int t() { atan(); return 0; }
106
+ /* end */
107
+
108
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby-static -lm -lpthread -ldl -lobjc "
109
+ conftest.c:1: warning: conflicting types for built-in function ‘atan’
110
+ checked program was:
111
+ /* begin */
112
+ 1: int atan();
113
+ 2: /*top*/
114
+ 3: /*
115
+ 4: * http://trac.macports.org/ticket/3604
116
+ 5: * gcc 4.0 on 10.4 has a problem
117
+ 6: */
118
+ 7: int main() { return 0; }
119
+ 8: int t() { atan(); return 0; }
120
+ /* end */
121
+
122
+ --------------------
123
+
124
+ have_library: checking for inflate() in -lz... -------------------- yes
125
+
126
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lm -lruby-static -lz -lm -lpthread -ldl -lobjc "
127
+ conftest.c: In function ‘t’:
128
+ conftest.c:3: error: ‘inflate’ undeclared (first use in this function)
129
+ conftest.c:3: error: (Each undeclared identifier is reported only once
130
+ conftest.c:3: error: for each function it appears in.)
131
+ checked program was:
132
+ /* begin */
133
+ 1: /*top*/
134
+ 2: int main() { return 0; }
135
+ 3: int t() { void ((*volatile p)()); p = (void ((*)()))inflate; return 0; }
136
+ /* end */
137
+
138
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lm -lruby-static -lz -lm -lpthread -ldl -lobjc "
139
+ checked program was:
140
+ /* begin */
141
+ 1: /*top*/
142
+ 2: int main() { return 0; }
143
+ 3: int t() { inflate(); return 0; }
144
+ /* end */
145
+
146
+ --------------------
147
+
148
+ have_library: checking for iconv_open() in -liconv... -------------------- no
149
+
150
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lz -lm -lruby-static -liconv -lz -lm -lpthread -ldl -lobjc "
151
+ conftest.c: In function ‘t’:
152
+ conftest.c:3: error: ‘iconv_open’ undeclared (first use in this function)
153
+ conftest.c:3: error: (Each undeclared identifier is reported only once
154
+ conftest.c:3: error: for each function it appears in.)
155
+ checked program was:
156
+ /* begin */
157
+ 1: /*top*/
158
+ 2: int main() { return 0; }
159
+ 3: int t() { void ((*volatile p)()); p = (void ((*)()))iconv_open; return 0; }
160
+ /* end */
161
+
162
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lz -lm -lruby-static -liconv -lz -lm -lpthread -ldl -lobjc "
163
+ Undefined symbols:
164
+ "_iconv_open", referenced from:
165
+ _t in ccwoc0As.o
166
+ ld: symbol(s) not found
167
+ collect2: ld returned 1 exit status
168
+ checked program was:
169
+ /* begin */
170
+ 1: /*top*/
171
+ 2: int main() { return 0; }
172
+ 3: int t() { iconv_open(); return 0; }
173
+ /* end */
174
+
175
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lz -lm -lruby-static -liconv -lz -lm -lpthread -ldl -lobjc "
176
+ Undefined symbols:
177
+ "_iconv_open", referenced from:
178
+ _t in ccNCicyh.o
179
+ ld: symbol(s) not found
180
+ collect2: ld returned 1 exit status
181
+ checked program was:
182
+ /* begin */
183
+ 1: int iconv_open();
184
+ 2: /*top*/
185
+ 3: /*
186
+ 4: * http://trac.macports.org/ticket/3604
187
+ 5: * gcc 4.0 on 10.4 has a problem
188
+ 6: */
189
+ 7: int main() { return 0; }
190
+ 8: int t() { iconv_open(); return 0; }
191
+ /* end */
192
+
193
+ --------------------
194
+
195
+ have_library: checking for libiconv_open() in -liconv... -------------------- yes
196
+
197
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lz -lm -lruby-static -liconv -lz -lm -lpthread -ldl -lobjc "
198
+ conftest.c: In function ‘t’:
199
+ conftest.c:3: error: ‘libiconv_open’ undeclared (first use in this function)
200
+ conftest.c:3: error: (Each undeclared identifier is reported only once
201
+ conftest.c:3: error: for each function it appears in.)
202
+ checked program was:
203
+ /* begin */
204
+ 1: /*top*/
205
+ 2: int main() { return 0; }
206
+ 3: int t() { void ((*volatile p)()); p = (void ((*)()))libiconv_open; return 0; }
207
+ /* end */
208
+
209
+ "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lz -lm -lruby-static -liconv -lz -lm -lpthread -ldl -lobjc "
210
+ checked program was:
211
+ /* begin */
212
+ 1: /*top*/
213
+ 2: int main() { return 0; }
214
+ 3: int t() { libiconv_open(); return 0; }
215
+ /* end */
216
+
217
+ --------------------
218
+
219
+ have_header: checking for libxml/xmlversion.h... -------------------- yes
220
+
221
+ "/usr/bin/gcc-4.2 -E -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/Users/victor/code/libxml-ruby/ext/libxml -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O2 -arch x86_64 -fno-common -pipe -fno-common -I/opt/local/include/libxml2 conftest.c -o conftest.i"
222
+ checked program was:
223
+ /* begin */
224
+ 1: #include <libxml/xmlversion.h>
225
+ /* end */
226
+
227
+ --------------------
228
+
@@ -0,0 +1,93 @@
1
+ /* Please see the LICENSE file for copyright and distribution information */
2
+
3
+ #ifndef __RUBY_LIBXML_H__
4
+ #define __RUBY_LIBXML_H__
5
+
6
+ #include <ruby.h>
7
+ #include <libxml/parser.h>
8
+ #include <libxml/parserInternals.h>
9
+ #include <libxml/debugXML.h>
10
+ #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
+
18
+ /* Needed for Ruby 1.8.5 */
19
+ #ifndef RARRAY_LEN
20
+ #define RARRAY_LEN(s) (RARRAY(s)->len)
21
+ #endif
22
+
23
+ /* Needed for Ruby 1.8.5 */
24
+ #ifndef RARRAY_PTR
25
+ #define RARRAY_PTR(s) (RARRAY(s)->ptr)
26
+ #endif
27
+
28
+ /* Needed for Ruby 1.8.5 */
29
+ #ifndef RSTRING_LEN
30
+ #define RSTRING_LEN(s) (RSTRING(s)->len)
31
+ #endif
32
+
33
+ /* Needed for Ruby 1.8.5 */
34
+ #ifndef RSTRING_PTR
35
+ #define RSTRING_PTR(s) (RSTRING(s)->ptr)
36
+ #endif
37
+
38
+ /* Needed prior to Ruby 1.9.1 */
39
+ #ifndef RHASH_TBL
40
+ #define RHASH_TBL(s) (RHASH(s)->tbl)
41
+ #endif
42
+
43
+ // not in Ruby 1.9
44
+ #ifndef GetWriteFile
45
+ #define GetWriteFile(fp) rb_io_stdio_file(fp)
46
+ #define OpenFile rb_io_t
47
+ #endif
48
+
49
+ #ifdef LIBXML_DEBUG_ENABLED
50
+ #include <libxml/xpathInternals.h>
51
+ #endif
52
+ #ifdef LIBXML_XINCLUDE_ENABLED
53
+ #include <libxml/xinclude.h>
54
+ #endif
55
+ #ifdef LIBXML_XPTR_ENABLED
56
+ #include <libxml/xpointer.h>
57
+ #endif
58
+
59
+ #include "ruby_xml_version.h"
60
+ #include "ruby_xml.h"
61
+ #include "ruby_xml_io.h"
62
+ #include "ruby_xml_error.h"
63
+ #include "ruby_xml_encoding.h"
64
+ #include "ruby_xml_attributes.h"
65
+ #include "ruby_xml_attr.h"
66
+ #include "ruby_xml_attr_decl.h"
67
+ #include "ruby_xml_document.h"
68
+ #include "ruby_xml_node.h"
69
+ #include "ruby_xml_namespace.h"
70
+ #include "ruby_xml_namespaces.h"
71
+ #include "ruby_xml_parser.h"
72
+ #include "ruby_xml_parser_options.h"
73
+ #include "ruby_xml_parser_context.h"
74
+ #include "ruby_xml_html_parser.h"
75
+ #include "ruby_xml_html_parser_options.h"
76
+ #include "ruby_xml_html_parser_context.h"
77
+ #include "ruby_xml_reader.h"
78
+ #include "ruby_xml_sax2_handler.h"
79
+ #include "ruby_xml_sax_parser.h"
80
+ #include "ruby_xml_xinclude.h"
81
+ #include "ruby_xml_xpath.h"
82
+ #include "ruby_xml_xpath_expression.h"
83
+ #include "ruby_xml_xpath_context.h"
84
+ #include "ruby_xml_xpath_object.h"
85
+ #include "ruby_xml_xpointer.h"
86
+ #include "ruby_xml_input_cbg.h"
87
+ #include "ruby_xml_dtd.h"
88
+ #include "ruby_xml_schema.h"
89
+ #include "ruby_xml_relaxng.h"
90
+
91
+ extern VALUE mLibXML;
92
+
93
+ #endif
@@ -0,0 +1,893 @@
1
+ #include "ruby_libxml.h"
2
+ #include "ruby_xml.h"
3
+
4
+ VALUE mXML;
5
+
6
+ /*
7
+ * call-seq:
8
+ * XML.catalog_dump -> true
9
+ *
10
+ * Dump all the global catalog content stdout.
11
+ */
12
+ static VALUE rxml_catalog_dump(VALUE self)
13
+ {
14
+ xmlCatalogDump(stdout);
15
+ return (Qtrue);
16
+ }
17
+
18
+ /*
19
+ * call-seq:
20
+ * XML.catalog_remove(catalog) -> true
21
+ *
22
+ * Remove the specified resource catalog.
23
+ */
24
+ static VALUE rxml_catalog_remove(VALUE self, VALUE cat)
25
+ {
26
+ Check_Type(cat, T_STRING);
27
+ xmlCatalogRemove((xmlChar *) StringValuePtr(cat));
28
+ return (Qtrue);
29
+ }
30
+
31
+ /*
32
+ * call-seq:
33
+ * XML.check_lib_versions -> true
34
+ *
35
+ * Check LIBXML version matches version the bindings
36
+ * were compiled to. Throws an exception if not.
37
+ */
38
+ static VALUE rxml_check_lib_versions(VALUE klass)
39
+ {
40
+ xmlCheckVersion(LIBXML_VERSION);
41
+ return (Qtrue);
42
+ }
43
+
44
+ /*
45
+ * call-seq:
46
+ * XML.enabled_automata? -> (true|false)
47
+ *
48
+ * Determine whether libxml regexp automata support is enabled.
49
+ */
50
+ static VALUE rxml_enabled_automata_q(VALUE klass)
51
+ {
52
+ #ifdef LIBXML_AUTOMATA_ENABLED
53
+ return(Qtrue);
54
+ #else
55
+ return (Qfalse);
56
+ #endif
57
+ }
58
+
59
+ /*
60
+ * call-seq:
61
+ * XML.enabled_c14n? -> (true|false)
62
+ *
63
+ * Determine whether libxml 'canonical XML' support is enabled.
64
+ * See "Canonical XML" (http://www.w3.org/TR/xml-c14n)
65
+ */
66
+ static VALUE rxml_enabled_c14n_q(VALUE klass)
67
+ {
68
+ #ifdef LIBXML_C14N_ENABLED
69
+ return(Qtrue);
70
+ #else
71
+ return (Qfalse);
72
+ #endif
73
+ }
74
+
75
+ /*
76
+ * call-seq:
77
+ * XML.enabled_catalog? -> (true|false)
78
+ *
79
+ * Determine whether libxml resource catalog support is enabled.
80
+ */
81
+ static VALUE rxml_enabled_catalog_q(VALUE klass)
82
+ {
83
+ #ifdef LIBXML_CATALOG_ENABLED
84
+ return(Qtrue);
85
+ #else
86
+ return (Qfalse);
87
+ #endif
88
+ }
89
+
90
+ /*
91
+ * call-seq:
92
+ * XML.enabled_debug? -> (true|false)
93
+ *
94
+ * Determine whether libxml debugging support is enabled.
95
+ */
96
+ static VALUE rxml_enabled_debug_q(VALUE klass)
97
+ {
98
+ #ifdef LIBXML_DEBUG_ENABLED
99
+ return(Qtrue);
100
+ #else
101
+ return (Qfalse);
102
+ #endif
103
+ }
104
+
105
+ /*
106
+ * call-seq:
107
+ * XML.enabled_docbook? -> (true|false)
108
+ *
109
+ * Determine whether libxml docbook support is enabled.
110
+ */
111
+ static VALUE rxml_enabled_docbook_q(VALUE klass)
112
+ {
113
+ #ifdef LIBXML_DOCB_ENABLED
114
+ return(Qtrue);
115
+ #else
116
+ return (Qfalse);
117
+ #endif
118
+ }
119
+
120
+ /*
121
+ * call-seq:
122
+ * XML.enabled_ftp? -> (true|false)
123
+ *
124
+ * Determine whether libxml ftp client support is enabled.
125
+ */
126
+ static VALUE rxml_enabled_ftp_q(VALUE klass)
127
+ {
128
+ #ifdef LIBXML_FTP_ENABLED
129
+ return(Qtrue);
130
+ #else
131
+ return (Qfalse);
132
+ #endif
133
+ }
134
+
135
+ /*
136
+ * call-seq:
137
+ * XML.enabled_http? -> (true|false)
138
+ *
139
+ * Determine whether libxml http client support is enabled.
140
+ */
141
+ static VALUE rxml_enabled_http_q(VALUE klass)
142
+ {
143
+ #ifdef LIBXML_HTTP_ENABLED
144
+ return(Qtrue);
145
+ #else
146
+ return (Qfalse);
147
+ #endif
148
+ }
149
+
150
+ /*
151
+ * call-seq:
152
+ * XML.enabled_html? -> (true|false)
153
+ *
154
+ * Determine whether libxml html support is enabled.
155
+ */
156
+ static VALUE rxml_enabled_html_q(VALUE klass)
157
+ {
158
+ #ifdef LIBXML_HTML_ENABLED
159
+ return(Qtrue);
160
+ #else
161
+ return (Qfalse);
162
+ #endif
163
+ }
164
+
165
+ /*
166
+ * call-seq:
167
+ * XML.enabled_iconv? -> (true|false)
168
+ *
169
+ * Determine whether libxml iconv support is enabled.
170
+ */
171
+ static VALUE rxml_enabled_iconv_q(VALUE klass)
172
+ {
173
+ #ifdef LIBXML_ICONV_ENABLED
174
+ return(Qtrue);
175
+ #else
176
+ return (Qfalse);
177
+ #endif
178
+ }
179
+
180
+ /*
181
+ * call-seq:
182
+ * XML.enabled_memory_debug? -> (true|false)
183
+ *
184
+ * Determine whether libxml memory location debugging support
185
+ * is enabled.
186
+ */
187
+ static VALUE rxml_enabled_memory_debug_location_q(VALUE klass)
188
+ {
189
+ #ifdef DEBUG_MEMORY_LOCATION
190
+ return(Qtrue);
191
+ #else
192
+ return (Qfalse);
193
+ #endif
194
+ }
195
+
196
+ /*
197
+ * call-seq:
198
+ * XML.enabled_regexp? -> (true|false)
199
+ *
200
+ * Determine whether libxml regular expression support is enabled.
201
+ */
202
+ static VALUE rxml_enabled_regexp_q(VALUE klass)
203
+ {
204
+ #ifdef LIBXML_REGEXP_ENABLED
205
+ return(Qtrue);
206
+ #else
207
+ return (Qfalse);
208
+ #endif
209
+ }
210
+
211
+ /*
212
+ * call-seq:
213
+ * XML.enabled_schemas? -> (true|false)
214
+ *
215
+ * Determine whether libxml schema support is enabled.
216
+ */
217
+ static VALUE rxml_enabled_schemas_q(VALUE klass)
218
+ {
219
+ #ifdef LIBXML_SCHEMAS_ENABLED
220
+ return(Qtrue);
221
+ #else
222
+ return (Qfalse);
223
+ #endif
224
+ }
225
+
226
+ /*
227
+ * call-seq:
228
+ * XML.enabled_thread? -> (true|false)
229
+ *
230
+ * Determine whether thread-safe semantics support for libxml is enabled and
231
+ * is used by this ruby extension. Threading support in libxml uses pthread
232
+ * on Unix-like systems and Win32 threads on Windows.
233
+ */
234
+ static VALUE rxml_enabled_thread_q(VALUE klass)
235
+ {
236
+ /* This won't be defined unless this code is compiled with _REENTRANT or __MT__
237
+ * defined or the compiler is in C99 mode.
238
+ *
239
+ * Note the relevant portion libxml/xmlversion.h on a thread-enabled build:
240
+ *
241
+ * #if defined(_REENTRANT) || defined(__MT__) || \
242
+ * (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
243
+ * #define LIBXML_THREAD_ENABLED
244
+ * #endif
245
+ *
246
+ */
247
+ #ifdef LIBXML_THREAD_ENABLED
248
+ return(Qtrue);
249
+ #else
250
+ return (Qfalse);
251
+ #endif
252
+ }
253
+
254
+ /*
255
+ * call-seq:
256
+ * XML.enabled_unicode? -> (true|false)
257
+ *
258
+ * Determine whether libxml unicode support is enabled.
259
+ */
260
+ static VALUE rxml_enabled_unicode_q(VALUE klass)
261
+ {
262
+ #ifdef LIBXML_UNICODE_ENABLED
263
+ return(Qtrue);
264
+ #else
265
+ return (Qfalse);
266
+ #endif
267
+ }
268
+
269
+ /*
270
+ * call-seq:
271
+ * XML.enabled_xinclude? -> (true|false)
272
+ *
273
+ * Determine whether libxml xinclude support is enabled.
274
+ */
275
+ static VALUE rxml_enabled_xinclude_q(VALUE klass)
276
+ {
277
+ #ifdef LIBXML_XINCLUDE_ENABLED
278
+ return(Qtrue);
279
+ #else
280
+ return (Qfalse);
281
+ #endif
282
+ }
283
+
284
+ /*
285
+ * call-seq:
286
+ * XML.enabled_xpath? -> (true|false)
287
+ *
288
+ * Determine whether libxml xpath support is enabled.
289
+ */
290
+ static VALUE rxml_enabled_xpath_q(VALUE klass)
291
+ {
292
+ #ifdef LIBXML_XPATH_ENABLED
293
+ return(Qtrue);
294
+ #else
295
+ return (Qfalse);
296
+ #endif
297
+ }
298
+
299
+ /*
300
+ * call-seq:
301
+ * XML.enabled_xpointer? -> (true|false)
302
+ *
303
+ * Determine whether libxml xpointer support is enabled.
304
+ */
305
+ static VALUE rxml_enabled_xpointer_q(VALUE klass)
306
+ {
307
+ #ifdef LIBXML_XPTR_ENABLED
308
+ return(Qtrue);
309
+ #else
310
+ return (Qfalse);
311
+ #endif
312
+ }
313
+
314
+ /*
315
+ * call-seq:
316
+ * XML.enabled_zlib? -> (true|false)
317
+ *
318
+ * Determine whether libxml zlib support is enabled.
319
+ */
320
+ static VALUE rxml_enabled_zlib_q(VALUE klass)
321
+ {
322
+ #ifdef HAVE_ZLIB_H
323
+ return(Qtrue);
324
+ #else
325
+ return (Qfalse);
326
+ #endif
327
+ }
328
+
329
+ /*
330
+ * call-seq:
331
+ * XML.debug_entities -> (true|false)
332
+ *
333
+ * Determine whether included-entity debugging is enabled.
334
+ * (Requires Libxml to be compiled with debugging support)
335
+ */
336
+ static VALUE rxml_debug_entities_get(VALUE klass)
337
+ {
338
+ #ifdef LIBXML_DEBUG_ENABLED
339
+ if (xmlParserDebugEntities)
340
+ return(Qtrue);
341
+ else
342
+ return(Qfalse);
343
+ #else
344
+ rb_warn("libxml was compiled with debugging turned off");
345
+ return (Qfalse);
346
+ #endif
347
+ }
348
+
349
+ /*
350
+ * call-seq:
351
+ * XML.debug_entities = true|false
352
+ *
353
+ * Enable or disable included-entity debugging.
354
+ * (Requires Libxml to be compiled with debugging support)
355
+ */
356
+ static VALUE rxml_debug_entities_set(VALUE klass, VALUE bool)
357
+ {
358
+ #ifdef LIBXML_DEBUG_ENABLED
359
+ if (TYPE(bool) == T_FALSE)
360
+ {
361
+ xmlParserDebugEntities = 0;
362
+ return(Qfalse);
363
+ }
364
+ else
365
+ {
366
+ xmlParserDebugEntities = 1;
367
+ return(Qtrue);
368
+ }
369
+ #else
370
+ rb_warn("libxml was compiled with debugging turned off");
371
+ #endif
372
+ }
373
+
374
+ /*
375
+ * call-seq:
376
+ * XML.default_keep_blanks -> (true|false)
377
+ *
378
+ * Determine whether parsers retain whitespace by default.
379
+ */
380
+ static VALUE rxml_default_keep_blanks_get(VALUE klass)
381
+ {
382
+ if (xmlKeepBlanksDefaultValue)
383
+ return (Qtrue);
384
+ else
385
+ return (Qfalse);
386
+ }
387
+
388
+ /*
389
+ * call-seq:
390
+ * XML.default_keep_blanks = true|false
391
+ *
392
+ * Controls whether parsers retain whitespace by default.
393
+ */
394
+ static VALUE rxml_default_keep_blanks_set(VALUE klass, VALUE bool)
395
+ {
396
+ if (TYPE(bool) == T_FALSE)
397
+ {
398
+ xmlKeepBlanksDefaultValue = 0;
399
+ return (Qfalse);
400
+ }
401
+ else if (TYPE(bool) == T_TRUE)
402
+ {
403
+ xmlKeepBlanksDefaultValue = 1;
404
+ return (Qtrue);
405
+ }
406
+ else
407
+ {
408
+ rb_raise(rb_eArgError, "Invalid argument, must be a boolean");
409
+ }
410
+ }
411
+
412
+ /*
413
+ * call-seq:
414
+ * XML.default_load_external_dtd -> (true|false)
415
+ *
416
+ * Determine whether parsers load external DTDs by default.
417
+ */
418
+ static VALUE rxml_default_load_external_dtd_get(VALUE klass)
419
+ {
420
+ if (xmlLoadExtDtdDefaultValue)
421
+ return (Qtrue);
422
+ else
423
+ return (Qfalse);
424
+ }
425
+
426
+ /*
427
+ * call-seq:
428
+ * XML.default_load_external_dtd = true|false
429
+ *
430
+ * Controls whether parsers load external DTDs by default.
431
+ */
432
+ static VALUE rxml_default_load_external_dtd_set(VALUE klass, VALUE bool)
433
+ {
434
+ if (bool == Qfalse)
435
+ {
436
+ xmlLoadExtDtdDefaultValue = 0;
437
+ return (Qfalse);
438
+ }
439
+ else
440
+ {
441
+ xmlLoadExtDtdDefaultValue = 1;
442
+ return (Qtrue);
443
+ }
444
+ }
445
+
446
+ /*
447
+ * call-seq:
448
+ * XML.default_line_numbers -> (true|false)
449
+ *
450
+ * Determine whether parsers retain line-numbers by default.
451
+ */
452
+ static VALUE rxml_default_line_numbers_get(VALUE klass)
453
+ {
454
+ if (xmlLineNumbersDefaultValue)
455
+ return (Qtrue);
456
+ else
457
+ return (Qfalse);
458
+ }
459
+
460
+ /*
461
+ * call-seq:
462
+ * XML.default_line_numbers = true|false
463
+ *
464
+ * Controls whether parsers retain line-numbers by default.
465
+ */
466
+ static VALUE rxml_default_line_numbers_set(VALUE klass, VALUE bool)
467
+ {
468
+ if (TYPE(bool) == T_FALSE)
469
+ {
470
+ xmlLineNumbersDefault(0);
471
+ return (Qfalse);
472
+ }
473
+ else
474
+ {
475
+ xmlLineNumbersDefault(1);
476
+ return (Qtrue);
477
+ }
478
+ }
479
+
480
+ int rxml_libxml_default_options()
481
+ {
482
+ int options = 0;
483
+
484
+ if (xmlLoadExtDtdDefaultValue)
485
+ options |= XML_PARSE_DTDLOAD;
486
+
487
+ if (xmlDoValidityCheckingDefaultValue)
488
+ options |= XML_PARSE_DTDVALID;
489
+
490
+ if (!xmlKeepBlanksDefaultValue)
491
+ options |= XML_PARSE_NOBLANKS;
492
+
493
+ if (xmlSubstituteEntitiesDefaultValue)
494
+ options |= XML_PARSE_NOENT;
495
+
496
+ if (!xmlGetWarningsDefaultValue)
497
+ options |= XML_PARSE_NOWARNING;
498
+
499
+ if (xmlPedanticParserDefaultValue)
500
+ options |= XML_PARSE_PEDANTIC;
501
+
502
+ return options;
503
+ }
504
+
505
+ /*
506
+ * call-seq:
507
+ * XML.default_options -> int
508
+ *
509
+ * Returns an integer that summarize libxml2's default options.
510
+ */
511
+ static VALUE rxml_default_options_get(VALUE klass)
512
+ {
513
+ int options = rxml_libxml_default_options();
514
+ return INT2NUM(options);
515
+ }
516
+
517
+ /*
518
+ * call-seq:
519
+ * XML.default_pedantic_parser -> (true|false)
520
+ *
521
+ * Determine whether parsers are pedantic by default.
522
+ */
523
+ static VALUE rxml_default_pedantic_parser_get(VALUE klass)
524
+ {
525
+ if (xmlPedanticParserDefaultValue)
526
+ return (Qtrue);
527
+ else
528
+ return (Qfalse);
529
+ }
530
+
531
+ /*
532
+ * call-seq:
533
+ * XML.default_pedantic_parser = true|false
534
+ *
535
+ * Controls whether parsers are pedantic by default.
536
+ */
537
+ static VALUE rxml_default_pedantic_parser_set(VALUE klass, VALUE bool)
538
+ {
539
+ if (TYPE(bool) == T_FALSE)
540
+ {
541
+ xmlPedanticParserDefault(0);
542
+ return (Qfalse);
543
+ }
544
+ else
545
+ {
546
+ xmlPedanticParserDefault(1);
547
+ return (Qtrue);
548
+ }
549
+ }
550
+
551
+ /*
552
+ * call-seq:
553
+ * XML.default_substitute_entities -> (true|false)
554
+ *
555
+ * Determine whether parsers perform inline entity substitution
556
+ * (for external entities) by default.
557
+ */
558
+ static VALUE rxml_default_substitute_entities_get(VALUE klass)
559
+ {
560
+ if (xmlSubstituteEntitiesDefaultValue)
561
+ return (Qtrue);
562
+ else
563
+ return (Qfalse);
564
+ }
565
+
566
+ /*
567
+ * call-seq:
568
+ * XML.default_substitute_entities = true|false
569
+ *
570
+ * Controls whether parsers perform inline entity substitution
571
+ * (for external entities) by default.
572
+ */
573
+ static VALUE rxml_default_substitute_entities_set(VALUE klass, VALUE bool)
574
+ {
575
+ if (bool == Qfalse)
576
+ {
577
+ xmlSubstituteEntitiesDefault(0);
578
+ return (Qfalse);
579
+ }
580
+ else
581
+ {
582
+ xmlSubstituteEntitiesDefault(1);
583
+ return (Qtrue);
584
+ }
585
+ }
586
+
587
+ /*
588
+ * call-seq:
589
+ * XML.default_tree_indent_string -> "string"
590
+ *
591
+ * Obtain the default string used by parsers to indent the XML tree
592
+ * for output.
593
+ */
594
+ static VALUE rxml_default_tree_indent_string_get(VALUE klass)
595
+ {
596
+ if (xmlTreeIndentString == NULL)
597
+ return (Qnil);
598
+ else
599
+ return (rb_str_new2(xmlTreeIndentString));
600
+ }
601
+
602
+ /*
603
+ * call-seq:
604
+ * XML.default_tree_indent_string = "string"
605
+ *
606
+ * Set the default string used by parsers to indent the XML tree
607
+ * for output.
608
+ */
609
+ static VALUE rxml_default_tree_indent_string_set(VALUE klass, VALUE string)
610
+ {
611
+ Check_Type(string, T_STRING);
612
+ xmlTreeIndentString = xmlStrdup((xmlChar *)StringValuePtr(string));
613
+ return (string);
614
+ }
615
+
616
+ /*
617
+ * call-seq:
618
+ * XML.default_validity_checking -> (true|false)
619
+ *
620
+ * Determine whether parsers perform XML validation by default.
621
+ */
622
+ static VALUE rxml_default_validity_checking_get(VALUE klass)
623
+ {
624
+ if (xmlDoValidityCheckingDefaultValue)
625
+ return (Qtrue);
626
+ else
627
+ return (Qfalse);
628
+ }
629
+
630
+ /*
631
+ * call-seq:
632
+ * XML.default_validity_checking = true|false
633
+ *
634
+ * Controls whether parsers perform XML validation by default.
635
+ */
636
+ static VALUE rxml_default_validity_checking_set(VALUE klass, VALUE bool)
637
+ {
638
+ if (TYPE(bool) == T_FALSE)
639
+ {
640
+ xmlDoValidityCheckingDefaultValue = 0;
641
+ return (Qfalse);
642
+ }
643
+ else
644
+ {
645
+ xmlDoValidityCheckingDefaultValue = 1;
646
+ return (Qtrue);
647
+ }
648
+ }
649
+
650
+ /*
651
+ * call-seq:
652
+ * XML.default_warnings -> (true|false)
653
+ *
654
+ * Determine whether parsers output warnings by default.
655
+ */
656
+ static VALUE rxml_default_warnings_get(VALUE klass)
657
+ {
658
+ if (xmlGetWarningsDefaultValue)
659
+ return (Qtrue);
660
+ else
661
+ return (Qfalse);
662
+ }
663
+
664
+ /*
665
+ * call-seq:
666
+ * XML.default_warnings = true|false
667
+ *
668
+ * Controls whether parsers output warnings by default.
669
+ */
670
+ static VALUE rxml_default_warnings_set(VALUE klass, VALUE bool)
671
+ {
672
+ if (TYPE(bool) == T_FALSE)
673
+ {
674
+ xmlGetWarningsDefaultValue = 0;
675
+ return (Qfalse);
676
+ }
677
+ else
678
+ {
679
+ xmlGetWarningsDefaultValue = 1;
680
+ return (Qtrue);
681
+ }
682
+ }
683
+
684
+ /*
685
+ * call-seq:
686
+ * XML.default_compression -> (true|false)
687
+ *
688
+ * Determine whether parsers use Zlib compression by default
689
+ * (requires libxml to be compiled with Zlib support).
690
+ */
691
+ static VALUE rxml_default_compression_get(VALUE klass)
692
+ {
693
+ #ifdef HAVE_ZLIB_H
694
+ return(INT2FIX(xmlGetCompressMode()));
695
+ #else
696
+ rb_warn("libxml was compiled without zlib support");
697
+ return (Qfalse);
698
+ #endif
699
+ }
700
+
701
+ /*
702
+ * call-seq:
703
+ * XML.default_compression = true|false
704
+ *
705
+ * Controls whether parsers use Zlib compression by default
706
+ * (requires libxml to be compiled with Zlib support).
707
+ */
708
+ static VALUE rxml_default_compression_set(VALUE klass, VALUE num)
709
+ {
710
+ #ifdef HAVE_ZLIB_H
711
+ Check_Type(num, T_FIXNUM);
712
+ xmlSetCompressMode(FIX2INT(num));
713
+ return(num);
714
+ #else
715
+ rb_warn("libxml was compiled without zlib support");
716
+ return (Qfalse);
717
+ #endif
718
+ }
719
+
720
+ /*
721
+ * call-seq:
722
+ * XML.features -> ["feature", ..., "feature"]
723
+ *
724
+ * Obtains an array of strings representing features supported
725
+ * (and enabled) by the installed libxml.
726
+ */
727
+ static VALUE rxml_features(VALUE klass)
728
+ {
729
+ VALUE arr, str;
730
+ int i, len = MAX_LIBXML_FEATURES_LEN;
731
+ char **list = NULL;
732
+
733
+ list = ALLOC_N(char *,MAX_LIBXML_FEATURES_LEN);
734
+ MEMZERO(list, char *, MAX_LIBXML_FEATURES_LEN);
735
+
736
+ arr = rb_ary_new();
737
+ if (xmlGetFeaturesList(&len, (const char **) list) == -1)
738
+ return Qnil;
739
+
740
+ for (i = 0; i < len; i++)
741
+ {
742
+ str = rb_str_new2((const char *) list[i]);
743
+ rb_gc_unregister_address(&str);
744
+ rb_ary_push(arr, str);
745
+ }
746
+
747
+ if (len == MAX_LIBXML_FEATURES_LEN)
748
+ rb_warn(
749
+ "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");
750
+
751
+ ruby_xfree(list);
752
+ return (arr);
753
+ }
754
+
755
+ /*
756
+ * call-seq:
757
+ * XML.indent_tree_output -> (true|false)
758
+ *
759
+ * Determines whether XML output will be indented
760
+ * (using the string supplied to +default_indent_tree_string+)
761
+ */
762
+ static VALUE rxml_indent_tree_output_get(VALUE klass)
763
+ {
764
+ if (xmlIndentTreeOutput)
765
+ return (Qtrue);
766
+ else
767
+ return (Qfalse);
768
+ }
769
+
770
+ /*
771
+ * call-seq:
772
+ * XML.indent_tree_output = true|false
773
+ *
774
+ * Controls whether XML output will be indented
775
+ * (using the string supplied to +default_indent_tree_string+)
776
+ */
777
+ static VALUE rxml_indent_tree_output_set(VALUE klass, VALUE bool)
778
+ {
779
+ if (TYPE(bool) == T_TRUE)
780
+ {
781
+ xmlIndentTreeOutput = 1;
782
+ return (Qtrue);
783
+ }
784
+ else if (TYPE(bool) == T_FALSE)
785
+ {
786
+ xmlIndentTreeOutput = 0;
787
+ return (Qfalse);
788
+ }
789
+ else
790
+ {
791
+ rb_raise(rb_eArgError, "Invalid argument, must be boolean");
792
+ }
793
+ }
794
+
795
+ /*
796
+ * call-seq:
797
+ * XML.memory_dump -> (true|false)
798
+ *
799
+ * Perform a parser memory dump (requires memory debugging
800
+ * support in libxml).
801
+ */
802
+ static VALUE rxml_memory_dump(VALUE self)
803
+ {
804
+ #ifdef DEBUG_MEMORY_LOCATION
805
+ xmlMemoryDump();
806
+ return(Qtrue);
807
+ #else
808
+ rb_warn("libxml was compiled without memory debugging support");
809
+ return (Qfalse);
810
+ #endif
811
+ }
812
+
813
+ /*
814
+ * call-seq:
815
+ * XML.memory_used -> num_bytes
816
+ *
817
+ * Perform a parser memory dump (requires memory debugging
818
+ * support in libxml).
819
+ */
820
+ static VALUE rxml_memory_used(VALUE self)
821
+ {
822
+ #ifdef DEBUG_MEMORY_LOCATION
823
+ return(INT2NUM(xmlMemUsed()));
824
+ #else
825
+ rb_warn("libxml was compiled without memory debugging support");
826
+ return (Qfalse);
827
+ #endif
828
+ }
829
+
830
+ /* The libxml gem provides Ruby language bindings for GNOME's Libxml2
831
+ * XML toolkit. Refer to the README file to get started
832
+ * and the LICENSE file for copyright and distribution information.
833
+ */
834
+
835
+ void rxml_init_xml(void)
836
+ {
837
+ mXML = rb_define_module_under(mLibXML, "XML");
838
+
839
+ /* Constants */
840
+ rb_define_const(mXML, "LIBXML_VERSION", rb_str_new2(LIBXML_DOTTED_VERSION));
841
+ rb_define_const(mXML, "VERSION", rb_str_new2(RUBY_LIBXML_VERSION));
842
+ rb_define_const(mXML, "VERNUM", INT2NUM(RUBY_LIBXML_VERNUM));
843
+ rb_define_const(mXML, "XML_NAMESPACE", rb_str_new2((const char*) XML_XML_NAMESPACE));
844
+
845
+ rb_define_module_function(mXML, "enabled_automata?", rxml_enabled_automata_q, 0);
846
+ rb_define_module_function(mXML, "enabled_c14n?", rxml_enabled_c14n_q, 0);
847
+ rb_define_module_function(mXML, "enabled_catalog?", rxml_enabled_catalog_q, 0);
848
+ rb_define_module_function(mXML, "enabled_debug?", rxml_enabled_debug_q, 0);
849
+ rb_define_module_function(mXML, "enabled_docbook?", rxml_enabled_docbook_q, 0);
850
+ rb_define_module_function(mXML, "enabled_ftp?", rxml_enabled_ftp_q, 0);
851
+ rb_define_module_function(mXML, "enabled_http?", rxml_enabled_http_q, 0);
852
+ rb_define_module_function(mXML, "enabled_html?", rxml_enabled_html_q, 0);
853
+ rb_define_module_function(mXML, "enabled_iconv?", rxml_enabled_iconv_q, 0);
854
+ rb_define_module_function(mXML, "enabled_memory_debug?", rxml_enabled_memory_debug_location_q, 0);
855
+ rb_define_module_function(mXML, "enabled_regexp?", rxml_enabled_regexp_q, 0);
856
+ rb_define_module_function(mXML, "enabled_schemas?", rxml_enabled_schemas_q, 0);
857
+ rb_define_module_function(mXML, "enabled_thread?", rxml_enabled_thread_q, 0);
858
+ rb_define_module_function(mXML, "enabled_unicode?", rxml_enabled_unicode_q, 0);
859
+ rb_define_module_function(mXML, "enabled_xinclude?", rxml_enabled_xinclude_q, 0);
860
+ rb_define_module_function(mXML, "enabled_xpath?", rxml_enabled_xpath_q, 0);
861
+ rb_define_module_function(mXML, "enabled_xpointer?", rxml_enabled_xpointer_q, 0);
862
+ rb_define_module_function(mXML, "enabled_zlib?", rxml_enabled_zlib_q, 0);
863
+
864
+ rb_define_module_function(mXML, "catalog_dump", rxml_catalog_dump, 0);
865
+ rb_define_module_function(mXML, "catalog_remove", rxml_catalog_remove, 1);
866
+ rb_define_module_function(mXML, "check_lib_versions", rxml_check_lib_versions, 0);
867
+ rb_define_module_function(mXML, "debug_entities", rxml_debug_entities_get, 0);
868
+ rb_define_module_function(mXML, "debug_entities=", rxml_debug_entities_set, 1);
869
+ rb_define_module_function(mXML, "default_compression", rxml_default_compression_get, 0);
870
+ rb_define_module_function(mXML, "default_compression=", rxml_default_compression_set, 1);
871
+ rb_define_module_function(mXML, "default_keep_blanks", rxml_default_keep_blanks_get, 0);
872
+ rb_define_module_function(mXML, "default_keep_blanks=", rxml_default_keep_blanks_set, 1);
873
+ rb_define_module_function(mXML, "default_load_external_dtd", rxml_default_load_external_dtd_get, 0);
874
+ rb_define_module_function(mXML, "default_load_external_dtd=", rxml_default_load_external_dtd_set, 1);
875
+ rb_define_module_function(mXML, "default_line_numbers", rxml_default_line_numbers_get, 0);
876
+ rb_define_module_function(mXML, "default_line_numbers=", rxml_default_line_numbers_set, 1);
877
+ rb_define_module_function(mXML, "default_options", rxml_default_options_get, 0);
878
+ rb_define_module_function(mXML, "default_pedantic_parser", rxml_default_pedantic_parser_get, 0);
879
+ rb_define_module_function(mXML, "default_pedantic_parser=", rxml_default_pedantic_parser_set, 1);
880
+ rb_define_module_function(mXML, "default_substitute_entities", rxml_default_substitute_entities_get, 0);
881
+ rb_define_module_function(mXML, "default_substitute_entities=", rxml_default_substitute_entities_set, 1);
882
+ rb_define_module_function(mXML, "default_tree_indent_string", rxml_default_tree_indent_string_get, 0);
883
+ rb_define_module_function(mXML, "default_tree_indent_string=", rxml_default_tree_indent_string_set, 1);
884
+ rb_define_module_function(mXML, "default_validity_checking", rxml_default_validity_checking_get, 0);
885
+ rb_define_module_function(mXML, "default_validity_checking=", rxml_default_validity_checking_set, 1);
886
+ rb_define_module_function(mXML, "default_warnings", rxml_default_warnings_get, 0);
887
+ rb_define_module_function(mXML, "default_warnings=", rxml_default_warnings_set, 1);
888
+ rb_define_module_function(mXML, "features", rxml_features, 0);
889
+ rb_define_module_function(mXML, "indent_tree_output", rxml_indent_tree_output_get, 0);
890
+ rb_define_module_function(mXML, "indent_tree_output=", rxml_indent_tree_output_set, 1);
891
+ rb_define_module_function(mXML, "memory_dump", rxml_memory_dump, 0);
892
+ rb_define_module_function(mXML, "memory_used", rxml_memory_used, 0);
893
+ }