Public instance methods
outlen_op
(method, *args)
A wrapper for library returning a string (binary data potentially)
[show source]
# File lib/rufus/tokyo/outlen.rb, line 30 30: def outlen_op (method, *args) 31: 32: args.unshift(@db) 33: 34: outlen = FFI::MemoryPointer.new(:int) 35: args << outlen 36: 37: out = lib.send(method, *args) 38: 39: return nil if out.address == 0 40: return out.get_bytes(0, outlen.get_int(0)) 41: ensure 42: outlen.free 43: end