MCPcopy Create free account
hub / github.com/commonmark/cmark / CMark

Class CMark

wrappers/wrapper.rb:4–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2require 'ffi'
3
4module CMark
5 extend FFI::Library
6
7 class Mem < FFI::Struct
8 layout :calloc, :pointer,
9 :realloc, :pointer,
10 :free, callback([:pointer], :void)
11 end
12
13 ffi_lib ['libcmark', 'cmark']
14 attach_function :cmark_get_default_mem_allocator, [], :pointer
15 attach_function :cmark_markdown_to_html, [:string, :size_t, :int], :pointer
16end
17
18def markdown_to_html(s)
19 len = s.bytesize

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected