mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 08:47:28 +01:00
Add wuffs_foo__bar__struct names
This commit is contained in:
1 parent
dc17398d64
commit
e26ba24fbf
2 files changed
+32
-23
No files matched your search
@@ -375,6 +375,8 @@ func (g *gen) genHeader(b *buffer) error {
|
|||||||
|
|
||||||
b.writes("// ---------------- Structs\n\n")
|
b.writes("// ---------------- Structs\n\n")
|
||||||
for _, n := range g.structList {
|
for _, n := range g.structList {
|
||||||
|
structName := n.QID().Str(g.tm)
|
||||||
|
b.printf("typedef struct %s%s__struct %s%s;\n\n", g.pkgPrefix, structName, g.pkgPrefix, structName)
|
||||||
if err := g.writeStruct(b, n); err != nil {
|
if err := g.writeStruct(b, n); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -626,7 +628,7 @@ func (g *gen) writeConstList(b *buffer, n *a.Expr) error {
|
|||||||
|
|
||||||
func (g *gen) writeStruct(b *buffer, n *a.Struct) error {
|
func (g *gen) writeStruct(b *buffer, n *a.Struct) error {
|
||||||
structName := n.QID().Str(g.tm)
|
structName := n.QID().Str(g.tm)
|
||||||
b.writes("typedef struct {\n")
|
b.printf("struct %s%s__struct {\n", g.pkgPrefix, structName)
|
||||||
b.writes("// Do not access the private_impl's fields directly. There is no API/ABI\n")
|
b.writes("// Do not access the private_impl's fields directly. There is no API/ABI\n")
|
||||||
b.writes("// compatibility or safety guarantee if you do so. Instead, use the\n")
|
b.writes("// compatibility or safety guarantee if you do so. Instead, use the\n")
|
||||||
b.printf("// %s%s__etc functions.\n", g.pkgPrefix, structName)
|
b.printf("// %s%s__etc functions.\n", g.pkgPrefix, structName)
|
||||||
@@ -687,7 +689,7 @@ func (g *gen) writeStruct(b *buffer, n *a.Struct) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
b.printf("} %s%s;\n\n", g.pkgPrefix, structName)
|
b.writes("};\n\n")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2201,7 +2201,9 @@ extern "C" {
|
|||||||
|
|
||||||
// ---------------- Structs
|
// ---------------- Structs
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wuffs_adler32__hasher__struct wuffs_adler32__hasher;
|
||||||
|
|
||||||
|
struct wuffs_adler32__hasher__struct {
|
||||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||||
// compatibility or safety guarantee if you do so. Instead, use the
|
// compatibility or safety guarantee if you do so. Instead, use the
|
||||||
// wuffs_adler32__hasher__etc functions.
|
// wuffs_adler32__hasher__etc functions.
|
||||||
@@ -2222,8 +2224,7 @@ typedef struct {
|
|||||||
check_wuffs_version(size_t sizeof_star_self, uint64_t wuffs_version);
|
check_wuffs_version(size_t sizeof_star_self, uint64_t wuffs_version);
|
||||||
inline uint32_t update(wuffs_base__slice_u8 a_x);
|
inline uint32_t update(wuffs_base__slice_u8 a_x);
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
};
|
||||||
} wuffs_adler32__hasher;
|
|
||||||
|
|
||||||
// ---------------- Public Initializer Prototypes
|
// ---------------- Public Initializer Prototypes
|
||||||
|
|
||||||
@@ -2282,7 +2283,9 @@ extern "C" {
|
|||||||
|
|
||||||
// ---------------- Structs
|
// ---------------- Structs
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wuffs_crc32__ieee_hasher__struct wuffs_crc32__ieee_hasher;
|
||||||
|
|
||||||
|
struct wuffs_crc32__ieee_hasher__struct {
|
||||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||||
// compatibility or safety guarantee if you do so. Instead, use the
|
// compatibility or safety guarantee if you do so. Instead, use the
|
||||||
// wuffs_crc32__ieee_hasher__etc functions.
|
// wuffs_crc32__ieee_hasher__etc functions.
|
||||||
@@ -2302,8 +2305,7 @@ typedef struct {
|
|||||||
check_wuffs_version(size_t sizeof_star_self, uint64_t wuffs_version);
|
check_wuffs_version(size_t sizeof_star_self, uint64_t wuffs_version);
|
||||||
inline uint32_t update(wuffs_base__slice_u8 a_x);
|
inline uint32_t update(wuffs_base__slice_u8 a_x);
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
};
|
||||||
} wuffs_crc32__ieee_hasher;
|
|
||||||
|
|
||||||
// ---------------- Public Initializer Prototypes
|
// ---------------- Public Initializer Prototypes
|
||||||
|
|
||||||
@@ -2376,7 +2378,9 @@ extern const char* wuffs_deflate__error__no_huffman_codes;
|
|||||||
|
|
||||||
// ---------------- Structs
|
// ---------------- Structs
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wuffs_deflate__decoder__struct wuffs_deflate__decoder;
|
||||||
|
|
||||||
|
struct wuffs_deflate__decoder__struct {
|
||||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||||
// compatibility or safety guarantee if you do so. Instead, use the
|
// compatibility or safety guarantee if you do so. Instead, use the
|
||||||
// wuffs_deflate__decoder__etc functions.
|
// wuffs_deflate__decoder__etc functions.
|
||||||
@@ -2456,8 +2460,7 @@ typedef struct {
|
|||||||
inline wuffs_base__status decode(wuffs_base__io_writer a_dst,
|
inline wuffs_base__status decode(wuffs_base__io_writer a_dst,
|
||||||
wuffs_base__io_reader a_src);
|
wuffs_base__io_reader a_src);
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
};
|
||||||
} wuffs_deflate__decoder;
|
|
||||||
|
|
||||||
// ---------------- Public Initializer Prototypes
|
// ---------------- Public Initializer Prototypes
|
||||||
|
|
||||||
@@ -2527,7 +2530,9 @@ extern const char* wuffs_lzw__error__cyclical_prefix_chain;
|
|||||||
|
|
||||||
// ---------------- Structs
|
// ---------------- Structs
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wuffs_lzw__decoder__struct wuffs_lzw__decoder;
|
||||||
|
|
||||||
|
struct wuffs_lzw__decoder__struct {
|
||||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||||
// compatibility or safety guarantee if you do so. Instead, use the
|
// compatibility or safety guarantee if you do so. Instead, use the
|
||||||
// wuffs_lzw__decoder__etc functions.
|
// wuffs_lzw__decoder__etc functions.
|
||||||
@@ -2567,8 +2572,7 @@ typedef struct {
|
|||||||
inline wuffs_base__status decode(wuffs_base__io_writer a_dst,
|
inline wuffs_base__status decode(wuffs_base__io_writer a_dst,
|
||||||
wuffs_base__io_reader a_src);
|
wuffs_base__io_reader a_src);
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
};
|
||||||
} wuffs_lzw__decoder;
|
|
||||||
|
|
||||||
// ---------------- Public Initializer Prototypes
|
// ---------------- Public Initializer Prototypes
|
||||||
|
|
||||||
@@ -2643,7 +2647,9 @@ extern const char* wuffs_gif__error__too_much_pixel_data;
|
|||||||
|
|
||||||
// ---------------- Structs
|
// ---------------- Structs
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wuffs_gif__decoder__struct wuffs_gif__decoder;
|
||||||
|
|
||||||
|
struct wuffs_gif__decoder__struct {
|
||||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||||
// compatibility or safety guarantee if you do so. Instead, use the
|
// compatibility or safety guarantee if you do so. Instead, use the
|
||||||
// wuffs_gif__decoder__etc functions.
|
// wuffs_gif__decoder__etc functions.
|
||||||
@@ -2778,8 +2784,7 @@ typedef struct {
|
|||||||
wuffs_base__slice_u8 a_workbuf,
|
wuffs_base__slice_u8 a_workbuf,
|
||||||
wuffs_base__decode_frame_options* a_opts);
|
wuffs_base__decode_frame_options* a_opts);
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
};
|
||||||
} wuffs_gif__decoder;
|
|
||||||
|
|
||||||
// ---------------- Public Initializer Prototypes
|
// ---------------- Public Initializer Prototypes
|
||||||
|
|
||||||
@@ -2914,7 +2919,9 @@ extern const char* wuffs_gzip__error__bad_header;
|
|||||||
|
|
||||||
// ---------------- Structs
|
// ---------------- Structs
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wuffs_gzip__decoder__struct wuffs_gzip__decoder;
|
||||||
|
|
||||||
|
struct wuffs_gzip__decoder__struct {
|
||||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||||
// compatibility or safety guarantee if you do so. Instead, use the
|
// compatibility or safety guarantee if you do so. Instead, use the
|
||||||
// wuffs_gzip__decoder__etc functions.
|
// wuffs_gzip__decoder__etc functions.
|
||||||
@@ -2950,8 +2957,7 @@ typedef struct {
|
|||||||
inline wuffs_base__status decode(wuffs_base__io_writer a_dst,
|
inline wuffs_base__status decode(wuffs_base__io_writer a_dst,
|
||||||
wuffs_base__io_reader a_src);
|
wuffs_base__io_reader a_src);
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
};
|
||||||
} wuffs_gzip__decoder;
|
|
||||||
|
|
||||||
// ---------------- Public Initializer Prototypes
|
// ---------------- Public Initializer Prototypes
|
||||||
|
|
||||||
@@ -3033,7 +3039,9 @@ extern const char* wuffs_zlib__error__bad_parity_check;
|
|||||||
|
|
||||||
// ---------------- Structs
|
// ---------------- Structs
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wuffs_zlib__decoder__struct wuffs_zlib__decoder;
|
||||||
|
|
||||||
|
struct wuffs_zlib__decoder__struct {
|
||||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||||
// compatibility or safety guarantee if you do so. Instead, use the
|
// compatibility or safety guarantee if you do so. Instead, use the
|
||||||
// wuffs_zlib__decoder__etc functions.
|
// wuffs_zlib__decoder__etc functions.
|
||||||
@@ -3065,8 +3073,7 @@ typedef struct {
|
|||||||
inline wuffs_base__status decode(wuffs_base__io_writer a_dst,
|
inline wuffs_base__status decode(wuffs_base__io_writer a_dst,
|
||||||
wuffs_base__io_reader a_src);
|
wuffs_base__io_reader a_src);
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
};
|
||||||
} wuffs_zlib__decoder;
|
|
||||||
|
|
||||||
// ---------------- Public Initializer Prototypes
|
// ---------------- Public Initializer Prototypes
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user