Class: RubyVM::RJIT::CPointer::Bool

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_vm/rjit/c_pointer.rb

Overview

-Fiddle::TYPE_CHAR Immediate with special handling of true/false

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[]=(addr, value) ⇒ Object



236
237
238
# File 'lib/ruby_vm/rjit/c_pointer.rb', line 236

def self.[]=(addr, value)
  super(addr, value ? 1 : 0)
end

Instance Method Details

#*Object

Dereference



231
232
233
234
# File 'lib/ruby_vm/rjit/c_pointer.rb', line 231

def *
  return nil if @addr == 0
  super != 0
end