Module: Kernel
- Defined in:
- lib/sqlite3/driver/dl/driver.rb
Instance Method Summary collapse
-
#to_ptr ⇒ Object
Allows arbitrary objects to be passed as a pointer to functions.
Instance Method Details
#to_ptr ⇒ Object
Allows arbitrary objects to be passed as a pointer to functions. (Probably not very GC safe, but by encapsulating it like this we can change the implementation later.)
43 44 45 46 47 |
# File 'lib/sqlite3/driver/dl/driver.rb', line 43 def to_ptr ptr = DL.malloc(DL.sizeof("L")) ptr.set_object self ptr end |