mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
dl: minor improvement of get_shared_library_extension (#9070)
This commit is contained in:
parent
b3a31e7626
commit
0dafdb4cde
1 changed files with 6 additions and 7 deletions
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.
|
||||
[inline]
|
||||
pub fn get_shared_library_extension() string {
|
||||
mut res := '.so'
|
||||
$if macos {
|
||||
res = '.dylib'
|
||||
return $if windows {
|
||||
'.dll'
|
||||
} $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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue