Sha256: f9cbc51f3cbbd0095a7018a3a33fa9f35a040774b8bbaf7c43c128f75ccf85ef
Contents?: true
Size: 304 Bytes
Versions: 6
Compression:
Stored size: 304 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
6 entries across 6 versions & 1 rubygems