Skip to content

Commit

Permalink
Merge pull request #1986 from yebblies/globaldtor
Browse files Browse the repository at this point in the history
[DDMD] Make global a struct without a default constructor
  • Loading branch information
yebblies committed May 10, 2013
2 parents 1290d1b + 4e16f23 commit 374e3dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/mars.c
Expand Up @@ -56,7 +56,7 @@ FILE *stdmsg;

Global global;

Global::Global()
void Global::init()
{
mars_ext = "d";
sym_ext = "d";
Expand Down Expand Up @@ -413,6 +413,7 @@ int tryMain(size_t argc, char *argv[])
char noboundscheck = 0;
int setdefaultlib = 0;
const char *inifilename = NULL;
global.init();

#ifdef DEBUG
printf("DMD %s DEBUG\n", global.version);
Expand Down
2 changes: 1 addition & 1 deletion src/mars.h
Expand Up @@ -290,7 +290,7 @@ struct Global
*/
bool endGagging(unsigned oldGagged);

Global();
void init();
};

extern Global global;
Expand Down

0 comments on commit 374e3dc

Please sign in to comment.