File: platform.rb

package info (click to toggle)
ruby-ffi-compiler 1.0.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 156 kB
  • sloc: ruby: 556; ansic: 16; makefile: 4
file content (29 lines) | stat: -rw-r--r-- 487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module FFI::Compiler
  class Platform
    LIBSUFFIX = FFI::Platform.mac? ? 'bundle' : FFI::Platform::LIBSUFFIX
    
    def self.system
      @@system ||= Platform.new
    end
    
    def map_library_name(name)
      "#{FFI::Platform::LIBPREFIX}#{name}.#{LIBSUFFIX}"
    end
    
    def arch
      FFI::Platform::ARCH
    end
    
    def os
      FFI::Platform::OS
    end
    
    def name
      FFI::Platform.name
    end
    
    def mac?
      FFI::Platform.mac?
    end
  end
end