Class: Babeltrace2::BTFieldEnumerationHandleCls

Inherits:
BTFieldIntegerHandle show all
Includes:
BTFieldEnumerationHandle
Defined in:
lib/babeltrace2/types.rb

Class Method Summary collapse

Methods inherited from BTHandle

from_native, native_type

Class Method Details

.to_native(value, context) ⇒ Object



411
412
413
414
415
416
417
418
419
# File 'lib/babeltrace2/types.rb', line 411

def to_native(value, context)
  unless value.nil?
    p = value.to_ptr
    raise "invalid type #{p.class}, expected #{BTFieldEnumerationHandle}" unless p.kind_of?(BTFieldEnumerationHandle)
    p
  else
    nil
  end
end