Skip to content

Commit 2188e4b

Browse files
[nstd.os.windows.shared_lib] Renamed add_dir to set_dir.
1 parent 1f49a35 commit 2188e4b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/nstd/os/windows/shared_lib.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ typedef struct {
1313
/// An optional (possibly null) shared Windows library handle.
1414
NSTDOptional(NSTDWindowsSharedLib) NSTDWindowsOptionalSharedLib;
1515

16-
/// Adds a directory to the system's search path used to load shared libraries.
16+
/// Sets a directory to the system's search path used to load shared libraries.
1717
///
1818
/// # Parameters:
1919
///
2020
/// - `const NSTDChar *path` - A path to a directory to search when looking for DLLs. Pass null to
21-
/// restore the default search order.
21+
/// restore the default search path.
2222
///
2323
/// # Returns
2424
///
@@ -27,7 +27,7 @@ NSTDOptional(NSTDWindowsSharedLib) NSTDWindowsOptionalSharedLib;
2727
/// # Safety
2828
///
2929
/// See <https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setdlldirectorya>.
30-
NSTDAPI NSTDErrorCode nstd_os_windows_shared_lib_add_dir(const NSTDChar *path);
30+
NSTDAPI NSTDErrorCode nstd_os_windows_shared_lib_set_dir(const NSTDChar *path);
3131

3232
/// Loads a shared library/module by name.
3333
///

src/os/windows/shared_lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ impl Drop for NSTDWindowsSharedLib {
2525
/// An optional (possibly null) shared Windows library handle.
2626
pub type NSTDWindowsOptionalSharedLib = NSTDOptional<NSTDWindowsSharedLib>;
2727

28-
/// Adds a directory to the system's search path used to load shared libraries.
28+
/// Sets a directory to the system's search path used to load shared libraries.
2929
///
3030
/// # Parameters:
3131
///
3232
/// - `const NSTDChar *path` - A path to a directory to search when looking for DLLs. Pass null to
33-
/// restore the default search order.
33+
/// restore the default search path.
3434
///
3535
/// # Returns
3636
///
@@ -41,7 +41,7 @@ pub type NSTDWindowsOptionalSharedLib = NSTDOptional<NSTDWindowsSharedLib>;
4141
/// See <https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setdlldirectorya>.
4242
#[inline]
4343
#[cfg_attr(feature = "clib", no_mangle)]
44-
pub unsafe extern "C" fn nstd_os_windows_shared_lib_add_dir(
44+
pub unsafe extern "C" fn nstd_os_windows_shared_lib_set_dir(
4545
path: *const NSTDChar,
4646
) -> NSTDErrorCode {
4747
(SetDllDirectoryA(path.cast()) == 0).into()

0 commit comments

Comments
 (0)