diff --git a/src/os/unix/consts.rs b/src/os/unix/consts.rs index 2c18f95..33c7b0c 100644 --- a/src/os/unix/consts.rs +++ b/src/os/unix/consts.rs @@ -7,7 +7,7 @@ use std::os::raw::c_int; /// Specifying `RTLD_LAZY` should improve performance on implementations supporting dynamic /// symbol binding since a process might not reference all of the symbols in an executable /// object file. And, for systems supporting dynamic symbol resolution for normal process -/// execution, this behavior mimics the normal handling of process execution. +/// execution, this behaviour mimics the normal handling of process execution. /// /// Conflicts with [`RTLD_NOW`]. /// @@ -18,7 +18,7 @@ pub const RTLD_LAZY: c_int = posix::RTLD_LAZY; /// /// All necessary relocations shall be performed when the executable object file is first /// loaded. This may waste some processing if relocations are performed for symbols -/// that are never referenced. This behavior may be useful for applications that need to +/// that are never referenced. This behaviour may be useful for applications that need to /// know that all symbols referenced during execution will be available before /// [`Library::open`] returns. /// diff --git a/src/os/unix/mod.rs b/src/os/unix/mod.rs index 0835fb8..9bed0c6 100644 --- a/src/os/unix/mod.rs +++ b/src/os/unix/mod.rs @@ -142,7 +142,7 @@ impl Library { pub fn this() -> Library { unsafe { // SAFE: this does not load any new shared library images, no danger in it executing - // initializer routines. + // initialiser routines. Library::open(None::<&OsStr>, RTLD_LAZY | RTLD_LOCAL).expect("this should never fail") } } diff --git a/src/os/windows/mod.rs b/src/os/windows/mod.rs index 3a4d168..022c19b 100644 --- a/src/os/windows/mod.rs +++ b/src/os/windows/mod.rs @@ -452,7 +452,7 @@ pub const LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE: DWORD = consts::LOAD_LIBRARY_AS_DA /// Map the file into the process’ virtual address space as an image file. /// -/// The loader does not load the static imports or perform the other usual initialization steps. +/// The loader does not load the static imports or perform the other usual initialisation steps. /// Use this flag when you want to load a DLL only to extract messages or resources from it. /// /// Unless the application depends on the file having the in-memory layout of an image, this value @@ -513,7 +513,7 @@ pub const LOAD_LIBRARY_SEARCH_USER_DIRS: DWORD = consts::LOAD_LIBRARY_SEARCH_USE /// discussed in the [Remarks section] to find associated executable modules that the specified /// module causes to be loaded. /// -/// If this value is used and `filename` specifies a relative path, the behavior is undefined. +/// If this value is used and `filename` specifies a relative path, the behaviour is undefined. /// /// If this value is not used, or if `filename` does not specify a path, the system uses the /// standard search strategy discussed in the [Remarks section] to find associated executable diff --git a/tests/functions.rs b/tests/functions.rs index eef41e6..795f0cf 100644 --- a/tests/functions.rs +++ b/tests/functions.rs @@ -148,7 +148,7 @@ fn test_static_ptr() { } #[test] -// Something about i686-pc-windows-gnu, makes dll initialization code call abort when it is loaded +// Something about i686-pc-windows-gnu, makes dll initialisation code call abort when it is loaded // and unloaded many times. So far it seems like an issue with mingw, not libloading, so ignoring // the target. Especially since it is very unlikely to be fixed given the state of support its // support. @@ -193,7 +193,7 @@ fn library_this() { use libloading::os::windows::Library; make_helpers(); unsafe { - // SAFE: well-known library without initializers is loaded. + // SAFE: well-known library without initialisers is loaded. let _lib = Library::new(LIBPATH).unwrap(); let this = Library::this().expect("this library"); // SAFE: functions are never called.