Files
news.gitea.happylizard.me/bin/gems/nokogiri-1.18.3-x86_64-linux-gnu/ext/nokogiri/xml_document_fragment.c
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

30 lines
710 B
C

#include <nokogiri.h>
VALUE cNokogiriXmlDocumentFragment;
/* :nodoc: */
static VALUE
noko_xml_document_fragment_s_native_new(VALUE klass, VALUE rb_doc)
{
xmlDocPtr c_doc;
xmlNodePtr c_node;
VALUE rb_node;
c_doc = noko_xml_document_unwrap(rb_doc);
c_node = xmlNewDocFragment(c_doc->doc);
noko_xml_document_pin_node(c_node);
rb_node = noko_xml_node_wrap(klass, c_node);
return rb_node;
}
void
noko_init_xml_document_fragment(void)
{
assert(cNokogiriXmlNode);
cNokogiriXmlDocumentFragment = rb_define_class_under(mNokogiriXml, "DocumentFragment", cNokogiriXmlNode);
rb_define_singleton_method(cNokogiriXmlDocumentFragment, "native_new", noko_xml_document_fragment_s_native_new, 1);
}