mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +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
|
||||
}
|
||||
|
||||
@@ -2647,7 +2647,7 @@ extern const char* wuffs_deflate__error__no_huffman_codes;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t //
|
||||
static const uint64_t //
|
||||
wuffs_deflate__max_incl_workbuf_len //
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||
|
||||
@@ -2818,8 +2818,8 @@ extern const char* wuffs_lzw__error__bad_code;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t //
|
||||
wuffs_lzw__max_incl_workbuf_len //
|
||||
static const uint64_t //
|
||||
wuffs_lzw__max_incl_workbuf_len //
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 0;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
@@ -2982,8 +2982,8 @@ extern const char* wuffs_gif__error__too_much_pixel_data;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t //
|
||||
wuffs_gif__max_incl_workbuf_len //
|
||||
static const uint64_t //
|
||||
wuffs_gif__max_incl_workbuf_len //
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 65535;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
@@ -3276,8 +3276,8 @@ extern const char* wuffs_gzip__error__bad_header;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t //
|
||||
wuffs_gzip__max_incl_workbuf_len //
|
||||
static const uint64_t //
|
||||
wuffs_gzip__max_incl_workbuf_len //
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
@@ -3418,8 +3418,8 @@ extern const char* wuffs_zlib__error__bad_parity_check;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t //
|
||||
wuffs_zlib__max_incl_workbuf_len //
|
||||
static const uint64_t //
|
||||
wuffs_zlib__max_incl_workbuf_len //
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
|
||||
Reference in new issue
Block a user