Sha256: cc9ab391f1ee6015e9ccffd19c82fa30eb8141268fcd1baa6c601d251a9b5f9d
Contents?: true
Size: 272 Bytes
Versions: 2
Compression:
Stored size: 272 Bytes
Contents
# frozen_string_literal: true require 'gir_ffi/lib_c' module GirFFI # Helper module for alloction-related functionality. module AllocationHelper def self.free_after(ptr) result = yield ptr LibC.free ptr unless ptr.null? result end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gir_ffi-0.11.1 | lib/gir_ffi/allocation_helper.rb |
gir_ffi-0.11.0 | lib/gir_ffi/allocation_helper.rb |