mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Make cgen's public constants' always static
This commit is contained in:
1 parent
e45baffd51
commit
4af1b88ef8
2 files changed
+10
-15
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user