This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import core.stdc.stdio;
14
14
import core.stdc.ctype ;
15
15
import core.stdc.string ;
16
16
import core.vararg ;
17
+ import core.internal.traits : externDFunc;
18
+
17
19
18
20
@nogc nothrow :
19
21
extern extern (C) string [] rt_args();
@@ -22,6 +24,10 @@ extern extern(C) __gshared bool rt_envvars_enabled;
22
24
extern extern (C) __gshared bool rt_cmdline_enabled;
23
25
extern extern (C) __gshared string [] rt_options;
24
26
27
+ alias rt_configCallBack = string delegate (string ) @nogc nothrow ;
28
+ alias fn_configOption = string function (string opt, scope rt_configCallBack dg, bool reverse) @nogc nothrow ;
29
+ alias rt_configOption = externDFunc! (" rt.config.rt_configOption" , fn_configOption);
30
+
25
31
/**
26
32
* initialize members of struct CFG from rt_config options
27
33
*
@@ -32,13 +38,6 @@ extern extern(C) __gshared string[] rt_options;
32
38
*/
33
39
bool initConfigOptions (CFG )(ref CFG cfg, string cfgname)
34
40
{
35
- import core.internal.traits : externDFunc;
36
-
37
- alias rt_configCallBack = string delegate (string ) @nogc nothrow ;
38
- alias fn_configOption = string function (string opt, scope rt_configCallBack dg, bool reverse) @nogc nothrow ;
39
-
40
- alias rt_configOption = externDFunc! (" rt.config.rt_configOption" , fn_configOption);
41
-
42
41
string parse (string opt) @nogc nothrow
43
42
{
44
43
if (! parseOptions(cfg, opt))
Original file line number Diff line number Diff line change @@ -655,10 +655,7 @@ extern (C) UnitTestResult runModuleUnitTests()
655
655
}
656
656
}
657
657
658
- import core.internal.traits : externDFunc;
659
- alias rt_configCallBack = string delegate (string ) @nogc nothrow ;
660
- alias fn_configOption = string function (string opt, scope rt_configCallBack dg, bool reverse) @nogc nothrow ;
661
- alias rt_configOption = externDFunc! (" rt.config.rt_configOption" , fn_configOption);
658
+ import core.internal.parseoptions : rt_configOption;
662
659
663
660
if (results.passed != results.executed)
664
661
{
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ alias rt_configCallBack = string delegate(string) @nogc nothrow;
60
60
61
61
/**
62
62
* get a druntime config option using standard configuration options
63
- * opt name of the option to retreive
63
+ * opt name of the option to retrieve
64
64
* dg if non-null, passes the option through this
65
65
* delegate and only returns its return value if non-null
66
66
* reverse reverse the default processing order cmdline/envvar/rt_options
You can’t perform that action at this time.
0 commit comments