Mercurial > projects > ldc
changeset 990:2137797748a8
oups, seems like I broke some constness in D1 last commit, compiles again!
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 26 Feb 2009 14:23:18 +0100 |
parents | 420ef073448d |
children | 223a679053dd |
files | dmd/cond.c dmd/inifile.c |
diffstat | 2 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/cond.c Thu Feb 26 14:13:27 2009 +0100 +++ b/dmd/cond.c Thu Feb 26 14:23:18 2009 +0100 @@ -71,11 +71,11 @@ global.params.debuglevel = level; } -void DebugCondition::addGlobalIdent(char *ident) +void DebugCondition::addGlobalIdent(const char *ident) { if (!global.params.debugids) global.params.debugids = new Array(); - global.params.debugids->push(ident); + global.params.debugids->push((void*)ident); } @@ -123,7 +123,7 @@ global.params.versionlevel = level; } -void VersionCondition::checkPredefined(Loc loc, char *ident) +void VersionCondition::checkPredefined(Loc loc, const char *ident) { static const char* reserved[] = { @@ -151,17 +151,17 @@ error(loc, "version identifier '%s' is reserved and cannot be set", ident); } -void VersionCondition::addGlobalIdent(char *ident) +void VersionCondition::addGlobalIdent(const char *ident) { checkPredefined(0, ident); addPredefinedGlobalIdent(ident); } -void VersionCondition::addPredefinedGlobalIdent(char *ident) +void VersionCondition::addPredefinedGlobalIdent(const char *ident) { if (!global.params.versionids) global.params.versionids = new Array(); - global.params.versionids->push(ident); + global.params.versionids->push((void*)ident); }
--- a/dmd/inifile.c Thu Feb 26 14:13:27 2009 +0100 +++ b/dmd/inifile.c Thu Feb 26 14:23:18 2009 +0100 @@ -50,7 +50,7 @@ void inifile(char *argv0, const char *inifile) { char *path; // need path for @P macro - char *filename; + const char *filename; OutBuffer buf; int i; int k; @@ -80,7 +80,7 @@ filename = FileName::combine(getenv("HOME"), inifile); if (!FileName::exists(filename)) { - filename = FileName::replaceName(argv0, inifile); + filename = FileName::replaceName(argv0, (char*)inifile); if (!FileName::exists(filename)) { #if POSIX @@ -112,7 +112,7 @@ filename = FileName::searchPath(paths, argv0, 0); if (!filename) goto Letc; // argv0 not found on path - filename = FileName::replaceName(filename, inifile); + filename = FileName::replaceName((char*)filename, (char*)inifile); if (FileName::exists(filename)) goto Ldone; #endif @@ -132,7 +132,7 @@ printf("\tpath = '%s', filename = '%s'\n", path, filename); #endif - File file(filename); + File file((char*)filename); if (file.read()) return; // error reading file