D-Programming-Language/druntime — pull request #336 by AndrejMitrovic (2012-10-23 19:52:39+00:00)
Title: Fix Issue 8544 - Expose cArgs in Druntime struct for C interfacing

This enhancement makes it easier to interface with C libraries which require the unprocessed **argc** and **argv** of a main function. This avoids having to use tricks like this:

```d
cast(char**) array(map!toStringz(dArgs)).ptr
```

For example it can be needed when a C library has to do processing on the main arguments before a D main function starts:

```d
shared static this()
{
CArgs cArgs = Druntime.cArgs;
initCLibrary(cArgs.argc, cArgs.argv);
}
```