Bug 15053 – Runtime.cArgs not @nogc

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2015-09-13T03:35:41Z
Last change time
2018-01-05T13:26:57Z
Assigned to
No Owner
Creator
Mithun Hunsur

Comments

Comment #0 by me — 2015-09-13T03:35:41Z
When using @nogc code and/or C standard library functions, accessing the standard C main arguments is useful. Unfortunately, cArgs is not @nogc: --- import core.stdc.stdio; import core.runtime; @nogc: void main() { // NG printf("%s\n", Runtime.cArgs.argv[0]); } ---
Comment #1 by github-bugzilla — 2015-11-18T14:56:27Z
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/def57c6a87e59b30990816372eaa425b3666704f Fix Issue 15053 - make Runtime.cArgs @nogc https://github.com/D-Programming-Language/druntime/commit/0c43b04f221c9582ebb89af5c5eb543d8f9d52b8 Merge pull request #1433 from Philpax/issue-15053 Fix Issue 15053 - make Runtime.cArgs @nogc
Comment #2 by github-bugzilla — 2016-01-03T14:10:11Z
Comment #3 by github-bugzilla — 2018-01-05T13:26:57Z