Sha256: d4b0de086d425f780ecc4e5484d58238c0293dcdc3476243d20f5f16a1a1ddbd
Contents?: true
Size: 720 Bytes
Versions: 14
Compression:
Stored size: 720 Bytes
Contents
# Bare minimum to get some things directly from the ZMQ library itself # (without the CZMQ wrapper). module CZMQ::FFI::LibZMQ extend ::FFI::Library lib_name = 'libzmq' lib_dirs = ['/usr/local/lib', '/opt/local/lib', '/usr/lib64'] env_path = ENV['LIBZMQ_PATH'] lib_dirs = [*env_path.split(':'), *lib_dirs] if env_path lib_paths = lib_dirs.map { |path| "#{path}/#{lib_name}.#{::FFI::Platform::LIBSUFFIX}" } ffi_lib lib_paths + [lib_name] opts = { blocking: true # only necessary on MRI to deal with the GIL. } attach_function :zmq_strerror, [:int], :string, **opts attach_function :zmq_errno, [], :int, **opts attach_function :zmq_version, [:pointer, :pointer, :pointer], :void, **opts end
Version data entries
14 entries across 14 versions & 1 rubygems