Module: Rufus::Tokyo::Outlen

Public Visibility

Public Instance Method Summary

#outlen_op(method, *args)

A wrapper for library returning a string (binary data potentially).

Public Instance Method Details

outlen_op

public outlen_op(method, *args)

A wrapper for library returning a string (binary data potentially)

[View source]


30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rufus/tokyo/outlen.rb', line 30

def outlen_op (method, *args)

  args.unshift(@db)

  outlen = FFI::MemoryPointer.new(:int)
  args << outlen

  out = lib.send(method, *args)

  return nil if out.address == 0
  return out.get_bytes(0, outlen.get_int(0))
ensure
  outlen.free
end
Generated on Friday, September 18 2009 at 10:35:38 AM by YARD 0.2.3.5 (ruby-1.8.7).