/* * call-seq: * reader.base_uri -> URI * * Determine the base URI of the node. */ static VALUE rxml_reader_base_uri(VALUE self) { xmlTextReaderPtr xReader = rxml_text_reader_get(self); const xmlChar *result = xmlTextReaderConstBaseUri(xReader); const xmlChar *xencoding = xmlTextReaderConstEncoding(xReader); return (result == NULL ? Qnil : rxml_new_cstr(result, xencoding)); }
/* * call-seq: * reader.base_uri -> URI * * Determine the base URI of the node. */ static VALUE rxml_reader_base_uri(VALUE self) { const xmlChar *result = xmlTextReaderConstBaseUri(rxml_text_reader_get(self)); return (result == NULL ? Qnil : rb_str_new2((const char*)result)); }
/* @method String XmlReader.constBaseUri() */ METHOD XmlReader_constBaseUri(Ctx *ctx, knh_sfp_t *sfp) { xmlTextReaderPtr reader = (xmlTextReaderPtr) p_cptr(sfp[0]); char* ret = (char*) xmlTextReaderConstBaseUri(reader); KNH_RETURN(ctx,sfp,new_String(ctx,B(ret),NULL)); }
//## @Native String XmlReader.constBaseUri(); static KMETHOD XmlReader_constBaseUri(KonohaContext *kctx, KonohaStack *sfp) { xmlTextReaderPtr reader = getRawXmlReader(sfp[0]); char* ret = (reader != NULL) ? (char *) xmlTextReaderConstBaseUri(reader) : NULL; KReturn(KLIB new_kString(kctx, GcUnsafe, ret, strlen(ret), 0)); }