Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 7bcac58

Browse files
authored
Merge pull request #2434 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2 parents 3228441 + adfd455 commit 7bcac58

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

changelog/array.dd

Lines changed: 0 additions & 3 deletions
This file was deleted.

changelog/crt_externs.dd

Lines changed: 0 additions & 3 deletions
This file was deleted.

changelog/destroy_noinit.dd

Lines changed: 0 additions & 3 deletions
This file was deleted.

changelog/string_view.dd

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/core/runtime.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ else version (WatchOS)
2121

2222
/// C interface for Runtime.loadLibrary
2323
extern (C) void* rt_loadLibrary(const char* name);
24+
/// ditto
25+
version (Windows) extern (C) void* rt_loadLibraryW(const wchar* name);
2426

2527
/// C interface for Runtime.unloadLibrary, returns 1/0 instead of bool
2628
extern (C) int rt_unloadLibrary(void* ptr);

test/shared/src/loadlibwin.d

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// https://issues.dlang.org/show_bug.cgi?id=19498
2+
void main()
3+
{
4+
import core.runtime;
5+
auto kernel32 = Runtime.loadLibrary("kernel32.dll");
6+
assert(kernel32);
7+
Runtime.unloadLibrary(kernel32);
8+
}

win64.mak

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ test_stdcpp:
108108
test_gc:
109109
$(MAKE) -f test\gc\win64.mak "DMD=$(DMD)" MODEL=$(MODEL) "VCDIR=$(VCDIR)" DRUNTIMELIB=$(DRUNTIME) "CC=$(CC)" test
110110

111-
test_all: test_uuid test_aa test_hash test_stdcpp test_gc
111+
test_loadlib:
112+
$(DMD) -m$(MODEL) -conf= -Isrc -defaultlib=$(DRUNTIME) -run test\shared\src\loadlibwin.d
113+
114+
test_all: test_uuid test_aa test_hash test_stdcpp test_gc test_loadlib
112115

113116
################### zip/install/clean ##########################
114117

0 commit comments

Comments
 (0)