Make cgen's public constants' always static

This commit is contained in:
Nigel Tao committed 2019-02-02 16:02:38 +11:00
1 parent e45baffd51
commit 4af1b88ef8
2 files changed
+10 -15

No files matched your search

+1 -6
View File
@@ -681,12 +681,7 @@ func (g *gen) gatherScalarConsts(b *buffer, n *a.Const) error {
}
func (g *gen) writeConst(b *buffer, n *a.Const) error {
if n.Public() {
b.writes("WUFFS_BASE__MAYBE_STATIC ")
} else {
b.writes("static ")
}
b.writes("const ")
b.writes("static const ")
if err := g.writeCTypeName(b, n.XType(), "//\n"+g.pkgPrefix, n.QID()[1].Str(g.tm)); err != nil {
return err
}