Class: Babeltrace2::BTSelfComponentPortHandleCls

Inherits:
BTPortHandle show all
Includes:
BTSelfComponentPortHandle
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



257
258
259
260
261
262
263
264
265
# File 'lib/babeltrace2/types.rb', line 257

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