Sha256: ec0b9d395f9bd2a7bfb5c2f85a4edb630473b1e47cf541e5fc3bc304ee703fa9
Contents?: true
Size: 305 Bytes
Versions: 10
Compression:
Stored size: 305 Bytes
Contents
require 'gir_ffi/lib_c' module GirFFI # Helper module providing a safe allocation method that raises an exception # if memory cannot be allocated. module AllocationHelper def self.safe_malloc(size) ptr = LibC.malloc size raise NoMemoryError if ptr.null? ptr end end end
Version data entries
10 entries across 10 versions & 1 rubygems