[Issue 8544] Expose "cArgs" in druntime
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 2 16:53:25 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8544
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-10-02 16:53:34 PDT ---
I'd like to fix this myself. But I'm not sure how this should be exposed in the
Runtime struct. Should it be two properties, 'argc' and 'argv', or a single
property such as the following, in core.runtime:
extern (C) CArgs rt_cArgs();
static @property string[] cArgs()
{
return rt_cArgs();
}
and in src\rt\dmain2.d:
struct CArgs
{
int argc
char** argv;
}
__gshared CArgs _cArgs = null;
extern (C) string[] rt_cArgs()
{
return _cArgs;
}
extern (C) int main(int argc, char** argv)
{
_cArgs.argc = argc;
_cArgs.argv = argv;
...
}
Thoughts?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list