Module: NDAV::FFI::Pointer::Converter
- Defined in:
- lib/ndav/ffi.rb
Instance Method Summary collapse
Instance Method Details
#FFIPointer(array) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/ndav/ffi.rb', line 79 def FFIPointer(array, *, **) # use instance_of? instead of kind_of? beacuase MemoryPointer is subclass of Pointer if array.instance_of? ::FFI::Pointer array elsif array.respond_to? :to_ffi_pointer array.to_ffi_pointer(*, **) elsif array.respond_to? :to_ndav array.to_ndav(*, **).to_ffi_pointer else ::NDAV.new(array, *, **).to_ffi_pointer end end |