mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: unify const names to snake_case
This commit is contained in:
parent
aef751861d
commit
dda875a9c8
58 changed files with 543 additions and 540 deletions
|
@ -3,9 +3,9 @@ module dl
|
|||
#include <dlfcn.h>
|
||||
|
||||
pub const (
|
||||
RTLD_NOW = C.RTLD_NOW
|
||||
RTLD_LAZY = C.RTLD_LAZY
|
||||
DL_EXT = '.so'
|
||||
rtld_now = C.RTLD_NOW
|
||||
rtld_lazy = C.RTLD_LAZY
|
||||
dl_ext = '.so'
|
||||
)
|
||||
|
||||
fn C.dlopen(filename charptr, flags int) voidptr
|
||||
|
|
|
@ -18,29 +18,29 @@ fn test_dl() {
|
|||
|
||||
fn run_test_invalid_lib_linux() {
|
||||
// ensure a not-existing dl won't be loaded
|
||||
h := dl.open('not-existing-dynamic-link-library', dl.RTLD_NOW)
|
||||
h := dl.open('not-existing-dynamic-link-library', dl.rtld_now)
|
||||
assert h == 0
|
||||
}
|
||||
|
||||
fn run_test_invalid_lib_windows() {
|
||||
// ensure a not-existing dl won't be loaded
|
||||
h := dl.open('not-existing-dynamic-link-library', dl.RTLD_NOW)
|
||||
h := dl.open('not-existing-dynamic-link-library', dl.rtld_now)
|
||||
assert h == 0
|
||||
}
|
||||
|
||||
fn run_test_valid_lib_windows() {
|
||||
h := dl.open('shell32', dl.RTLD_NOW)
|
||||
h := dl.open('shell32', dl.rtld_now)
|
||||
assert h != 0
|
||||
}
|
||||
|
||||
fn run_test_invalid_sym_windows() {
|
||||
h := dl.open('shell32', dl.RTLD_NOW)
|
||||
h := dl.open('shell32', dl.rtld_now)
|
||||
proc := dl.sym(h, 'CommandLineToArgvW2')
|
||||
assert proc == 0
|
||||
}
|
||||
|
||||
fn run_test_valid_sym_windows() {
|
||||
h := dl.open('shell32', dl.RTLD_NOW)
|
||||
h := dl.open('shell32', dl.rtld_now)
|
||||
proc := dl.sym(h, 'CommandLineToArgvW')
|
||||
assert proc != 0
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
module dl
|
||||
|
||||
pub const (
|
||||
RTLD_NOW = 0
|
||||
RTLD_LAZY = 0
|
||||
DL_EXT = '.dll'
|
||||
rtld_now = 0
|
||||
rtld_lazy = 0
|
||||
dl_ext = '.dll'
|
||||
)
|
||||
|
||||
fn C.LoadLibrary(libfilename C.LPCWSTR) voidptr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue