Skip to content

developer

kojix2 edited this page Aug 19, 2022 · 1 revision

Using Callback Functions in Ruby-FFI

atach_function adds a class variable. So, you can write code like the following. This was not well documented in the Ruby-FFI wiki.

def bcf_itr_querys(idx, hdr, s)
  hts_itr_querys(idx, s, @@bcf_hdr_name2id, hdr, @@hts_itr_query, @@bcf_readrec)
end

Clone this wiki locally