Module: GirFFI::AllocationHelper
- Defined in:
- lib/gir_ffi/allocation_helper.rb
Class Method Summary collapse
Class Method Details
.safe_malloc(size) ⇒ Object
5 6 7 8 9 |
# File 'lib/gir_ffi/allocation_helper.rb', line 5 def self.safe_malloc size ptr = LibC.malloc size raise NoMemoryError if ptr.null? ptr end |