class Babeltrace2::BTHandle

Public Class Methods

from_native(value, context) click to toggle source
# File lib/babeltrace2/types.rb, line 10
def from_native(value, context)
  new(value) #value.null? ? nil : new(value)
end
native_type() click to toggle source
# File lib/babeltrace2/types.rb, line 6
def native_type
  FFI::Type::POINTER
end
to_native(value, context) click to toggle source
# File lib/babeltrace2/types.rb, line 14
def to_native(value, context)
  unless value.nil?
    p = value.to_ptr
    raise "invalid type #{p.class}, expected #{self}" unless p.kind_of?(self)
    p
  else
    nil
  end
end