Skip to content

Commit

Permalink
globals.h: Add missing C++ constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Jan 14, 2025
1 parent d6f693b commit 38ee2f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/src/dmd/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ struct Verbose
struct ImportPathInfo
{
const char* path;

ImportPathInfo() : path(NULL) { }
ImportPathInfo(const char* p) : path(p) { }
};

// Put command line switches in here
Expand Down
6 changes: 6 additions & 0 deletions compiler/src/tests/cxxfrontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,12 @@ void test_backend(FuncDeclaration *f, Type *t)
f->fbody->accept(&v);
}

void test_import_paths(const char *path, const char *imppath)
{
global.path.push(path);
global.params.imppath.shift(imppath);
}

/**********************************/

int main(int argc, char **argv)
Expand Down

0 comments on commit 38ee2f5

Please sign in to comment.