Sha256: ad9790defe1452b8872d7963e62696a4b31650a30ab86b8892b7f0bfdca97b04

Contents?: true

Size: 364 Bytes

Versions: 1

Compression:

Stored size: 364 Bytes

Contents

module Xgb
  module Utils
    private

    def check_result(err)
      if err != 0
        # make friendly
        message = FFI.XGBGetLastError.split("\n").first.split(/:\d+: /, 2).last
        raise Xgb::Error, message
      end
    end

    # read_uint64 not available on JRuby
    def read_uint64(ptr)
      ptr.read_array_of_uint64(1).first
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xgb-0.1.3 lib/xgb/utils.rb