Skip to content

Commit

Permalink
Fixed bug that would cause manifest constants to lose their initializ…
Browse files Browse the repository at this point in the history
…ers.
  • Loading branch information
Adam Wilson committed Dec 22, 2011
1 parent bb539fe commit e8f065c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/declaration.c
Expand Up @@ -1584,7 +1584,7 @@ void VarDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
else
buf->writestring(ident->toChars());

if(isConst() || hgs->inImmutable || storage_class & STCimmutable || hgs->hdrgen != 1)
if(isConst() || hgs->inImmutable || storage_class & STCimmutable || storage_class & STCmanifest || hgs->hdrgen != 1)
{
if (init)
{ buf->writestring(" = ");
Expand Down
2 changes: 1 addition & 1 deletion src/statement.c
Expand Up @@ -783,7 +783,7 @@ void CompoundDeclarationStatement::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
buf->writestring(v->ident->toChars());
}

if(v->isConst() || hgs->inImmutable || hgs->hdrgen != 1)
if(v->isConst() || hgs->inImmutable || v->storage_class & STCimmutable || v->storage_class & STCmanifest || hgs->hdrgen != 1)
{
if (v->init)
{ buf->writestring(" = ");
Expand Down

0 comments on commit e8f065c

Please sign in to comment.