dl: minor improvement of get_shared_library_extension (#9070)
parent
b3a31e7626
commit
0dafdb4cde
13
vlib/dl/dl.v
13
vlib/dl/dl.v
|
@ -9,14 +9,13 @@ pub const (
|
||||||
// i.e. .dll on windows, .so on most unixes, .dylib on macos.
|
// i.e. .dll on windows, .so on most unixes, .dylib on macos.
|
||||||
[inline]
|
[inline]
|
||||||
pub fn get_shared_library_extension() string {
|
pub fn get_shared_library_extension() string {
|
||||||
mut res := '.so'
|
return $if windows {
|
||||||
$if macos {
|
'.dll'
|
||||||
res = '.dylib'
|
} $else $if macos {
|
||||||
|
'.dylib'
|
||||||
|
} $else {
|
||||||
|
'.so'
|
||||||
}
|
}
|
||||||
$if windows {
|
|
||||||
res = '.dll'
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get_libname returns a library name with the operating system specific extension for
|
// get_libname returns a library name with the operating system specific extension for
|
||||||
|
|
Loading…
Reference in New Issue