Permalink
Browse files

CHANGED: compiles with ruby 1.9

  • Loading branch information...
1 parent 7b70b3f commit 95472471dffe3cfe15a7c62eb09fd96eaeccba34 David Palm committed Oct 15, 2008
Showing with 6 additions and 6 deletions.
  1. +2 −2 ext/libxml/ruby_libxml.h
  2. +4 −4 ext/libxml/ruby_xml_xpath_context.c
View
@@ -6,8 +6,8 @@
#include "version.h"
#include <ruby.h>
-#include <rubyio.h>
-#include <util.h>
+#include <ruby/io.h>
+#include <ruby/util.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/debugXML.h>
@@ -4,7 +4,7 @@
#include "ruby_libxml.h"
#include "ruby_xml_xpath_context.h"
-#include <st.h>
+#include <ruby/st.h>
/*
@@ -204,12 +204,12 @@ ruby_xml_xpath_context_register_namespaces(VALUE self, VALUE nslist) {
ruby_xml_xpath_context_register_namespace(self, rprefix, ruri);
break;
case T_ARRAY:
- for (i = 0; i < RARRAY(nslist)->len; i++) {
- ruby_xml_xpath_context_register_namespaces(self, RARRAY(nslist)->ptr[i]);
+ for (i = 0; i < RARRAY_LEN(nslist); i++) {
+ ruby_xml_xpath_context_register_namespaces(self, RARRAY_PTR(nslist)[i]);
}
break;
case T_HASH:
- st_foreach(RHASH(nslist)->tbl, iterate_ns_hash, self);
+ st_foreach(RHASH_TBL(nslist), iterate_ns_hash, self);
break;
default:
rb_raise(rb_eArgError, "Invalid argument type, only accept string, array of strings, or an array of arrays");

0 comments on commit 9547247

Please sign in to comment.