15
15
# Platform notes:
16
16
# linux:
17
17
# Some distros allow "libvips.so", but only if the -dev headers have been
18
- # installed. To work everywhere, you must include the ABI number.
19
- # Confusingly, the file extension is not at the end. ffi adds the "lib"
18
+ # installed. To work everywhere, you must include the ABI number.
19
+ # Confusingly, the file extension is not at the end. ffi adds the "lib"
20
20
# prefix.
21
21
# mac:
22
22
# As linux, but the extension is at the end and is added by ffi.
23
23
# windows:
24
- # The ABI number must be included, but with a hyphen. ffi does not add a
24
+ # The ABI number must be included, but with a hyphen. ffi does not add a
25
25
# "lib" prefix or a ".dll" suffix.
26
26
def library_name ( name , abi_number )
27
27
if FFI ::Platform . windows?
28
- return "lib#{ name } -#{ abi_number } .dll"
28
+ "lib#{ name } -#{ abi_number } .dll"
29
29
elsif FFI ::Platform . mac?
30
- return "#{ name } .#{ abi_number } "
30
+ "#{ name } .#{ abi_number } "
31
31
else
32
- return "#{ name } .so.#{ abi_number } "
32
+ "#{ name } .so.#{ abi_number } "
33
33
end
34
34
end
35
35
@@ -42,7 +42,7 @@ class << self
42
42
43
43
extend FFI ::Library
44
44
45
- ffi_lib library_name ( 'glib-2.0' , 0 )
45
+ ffi_lib library_name ( 'glib-2.0' , 0 )
46
46
47
47
attach_function :g_malloc , [ :size_t ] , :pointer
48
48
@@ -134,7 +134,7 @@ def self.set_log_domain domain
134
134
module GObject
135
135
extend FFI ::Library
136
136
137
- ffi_lib library_name ( 'gobject-2.0' , 0 )
137
+ ffi_lib library_name ( 'gobject-2.0' , 0 )
138
138
139
139
# we can't just use ulong, windows has different int sizing rules
140
140
if FFI ::Platform ::ADDRESS_SIZE == 64
@@ -470,7 +470,7 @@ module GObject
470
470
module Vips
471
471
extend FFI ::Library
472
472
473
- ffi_lib library_name ( 'vips' , 42 )
473
+ ffi_lib library_name ( 'vips' , 42 )
474
474
475
475
LOG_DOMAIN = "VIPS"
476
476
GLib ::set_log_domain LOG_DOMAIN
0 commit comments