mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Don't generate header defs for private statuses
This commit is contained in:
1 parent
b385c30b4f
commit
e0311e3bb2
2 files changed
+5
-8
No files matched your search
@@ -199,6 +199,7 @@ type status struct {
|
|||||||
value int8
|
value int8
|
||||||
msg string
|
msg string
|
||||||
keyword t.ID
|
keyword t.ID
|
||||||
|
public bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (z status) cNamePrefix() string {
|
func (z status) cNamePrefix() string {
|
||||||
@@ -419,6 +420,9 @@ func (g *gen) genHeader(b *buffer) error {
|
|||||||
b.writes("\n")
|
b.writes("\n")
|
||||||
|
|
||||||
for _, s := range g.statusList {
|
for _, s := range g.statusList {
|
||||||
|
if !s.public {
|
||||||
|
continue
|
||||||
|
}
|
||||||
b.printf("extern const char* %s%s__%s;\n", g.pkgPrefix, s.cNamePrefix(), s.cName)
|
b.printf("extern const char* %s%s__%s;\n", g.pkgPrefix, s.cNamePrefix(), s.cName)
|
||||||
}
|
}
|
||||||
b.writes("\n")
|
b.writes("\n")
|
||||||
@@ -674,6 +678,7 @@ func (g *gen) gatherStatuses(b *buffer, n *a.Status) error {
|
|||||||
value: value,
|
value: value,
|
||||||
msg: msg,
|
msg: msg,
|
||||||
keyword: n.Keyword(),
|
keyword: n.Keyword(),
|
||||||
|
public: n.Public(),
|
||||||
}
|
}
|
||||||
g.statusList = append(g.statusList, s)
|
g.statusList = append(g.statusList, s)
|
||||||
g.statusMap[n.QID()] = s
|
g.statusMap[n.QID()] = s
|
||||||
|
|||||||
@@ -2274,13 +2274,7 @@ extern const char* wuffs_deflate__error__bad_literal_length_code_count;
|
|||||||
extern const char* wuffs_deflate__error__inconsistent_stored_block_length;
|
extern const char* wuffs_deflate__error__inconsistent_stored_block_length;
|
||||||
extern const char* wuffs_deflate__error__missing_end_of_block_code;
|
extern const char* wuffs_deflate__error__missing_end_of_block_code;
|
||||||
extern const char* wuffs_deflate__error__no_huffman_codes;
|
extern const char* wuffs_deflate__error__no_huffman_codes;
|
||||||
extern const char*
|
|
||||||
wuffs_deflate__error__internal_error_inconsistent_huffman_decoder_state;
|
|
||||||
extern const char*
|
|
||||||
wuffs_deflate__error__internal_error_inconsistent_huffman_end_of_block;
|
|
||||||
extern const char* wuffs_deflate__error__internal_error_inconsistent_i_o;
|
extern const char* wuffs_deflate__error__internal_error_inconsistent_i_o;
|
||||||
extern const char* wuffs_deflate__error__internal_error_inconsistent_distance;
|
|
||||||
extern const char* wuffs_deflate__error__internal_error_inconsistent_n_bits;
|
|
||||||
|
|
||||||
const char* wuffs_deflate__status__string(int32_t status_code);
|
const char* wuffs_deflate__status__string(int32_t status_code);
|
||||||
|
|
||||||
@@ -2565,7 +2559,6 @@ extern const char* wuffs_gif__error__bad_header;
|
|||||||
extern const char* wuffs_gif__error__bad_literal_width;
|
extern const char* wuffs_gif__error__bad_literal_width;
|
||||||
extern const char* wuffs_gif__error__not_enough_pixel_data;
|
extern const char* wuffs_gif__error__not_enough_pixel_data;
|
||||||
extern const char* wuffs_gif__error__too_much_pixel_data;
|
extern const char* wuffs_gif__error__too_much_pixel_data;
|
||||||
extern const char* wuffs_gif__error__internal_error_inconsistent_ri_wi;
|
|
||||||
|
|
||||||
const char* wuffs_gif__status__string(int32_t status_code);
|
const char* wuffs_gif__status__string(int32_t status_code);
|
||||||
|
|
||||||
@@ -2960,7 +2953,6 @@ extern const char* wuffs_zlib__error__bad_checksum;
|
|||||||
extern const char* wuffs_zlib__error__bad_compression_method;
|
extern const char* wuffs_zlib__error__bad_compression_method;
|
||||||
extern const char* wuffs_zlib__error__bad_compression_window_size;
|
extern const char* wuffs_zlib__error__bad_compression_window_size;
|
||||||
extern const char* wuffs_zlib__error__bad_parity_check;
|
extern const char* wuffs_zlib__error__bad_parity_check;
|
||||||
extern const char* wuffs_zlib__error__todo_unsupported_preset_dictionary;
|
|
||||||
|
|
||||||
const char* wuffs_zlib__status__string(int32_t status_code);
|
const char* wuffs_zlib__status__string(int32_t status_code);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user