Class: Babeltrace2::BTSelfComponentClassHandleCls

Inherits:
BTComponentClassHandle show all
Includes:
BTSelfComponentClassHandle
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



221
222
223
224
225
226
227
228
229
# File 'lib/babeltrace2/types.rb', line 221

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