Module: XMLSecurity::C::LibXML

Extended by:
FFI::Library
Defined in:
lib/xml_security/c/lib_xml.rb

Defined Under Namespace

Classes: XmlNode

Class Method Summary collapse

Class Method Details

.initObject



57
58
59
# File 'lib/xml_security/c/lib_xml.rb', line 57

def self.init
  xmlInitParser
end

.shutdownObject



61
62
63
# File 'lib/xml_security/c/lib_xml.rb', line 61

def self.shutdown
  xmlCleanupParser
end

.xmlFree(*args) ⇒ Object



53
54
55
# File 'lib/xml_security/c/lib_xml.rb', line 53

def self.xmlFree(*args)
  C::LibC.free(*args)
end

.xmlMalloc(*args) ⇒ Object

Patching over to straight libc malloc/free until we can figure out why xmlMalloc,Free cause ruby to blow up so spectacularly. See the following thread for more info:

groups.google.com/d/topic/ruby-ffi/wClez3YsLQE/discussion

attach_function :xmlFree, [ :pointer ], :void attach_function :xmlMalloc, [ :int ], :pointer



49
50
51
# File 'lib/xml_security/c/lib_xml.rb', line 49

def self.xmlMalloc(*args)
  C::LibC.malloc(*args)
end