ext/nokogiri/xml_namespace.c in nokogiri-maglev--1.5.2 vs ext/nokogiri/xml_namespace.c in nokogiri-maglev--1.5.3

- old
+ new

@@ -9,17 +9,14 @@ * Get the prefix for this namespace. Returns +nil+ if there is no prefix. */ static VALUE prefix(VALUE self) { xmlNsPtr ns; - xmlDocPtr doc; Data_Get_Struct(self, xmlNs, ns); if(!ns->prefix) return Qnil; - Data_Get_Struct(rb_iv_get(self, "@document"), xmlDoc, doc); - return NOKOGIRI_STR_NEW2(ns->prefix); } /* * call-seq: @@ -28,15 +25,12 @@ * Get the href for this namespace */ static VALUE href(VALUE self) { xmlNsPtr ns; - xmlDocPtr doc; Data_Get_Struct(self, xmlNs, ns); if(!ns->href) return Qnil; - - Data_Get_Struct(rb_iv_get(self, "@document"), xmlDoc, doc); return NOKOGIRI_STR_NEW2(ns->href); } VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node)