mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 09:01:35 +01:00
Let Wuffs compile with MSVC (Microsoft Visual C++)
This commit is contained in:
1 parent
438fc10597
commit
ab7d6de318
13 files changed
+182
-155
No files matched your search
@@ -289,12 +289,17 @@ func (g *gen) writeVars(b *buffer, f *funk, inStructDecl bool) error {
|
||||
b.writes(" = false;\n")
|
||||
} else if typ.IsStatus() {
|
||||
b.writes(" = NULL;\n")
|
||||
} else if typ.IsIOType() {
|
||||
b.writes(" = {.private_impl = {0}};\n")
|
||||
} else {
|
||||
b.writes(" = {};\n")
|
||||
b.writes(" = {0};\n")
|
||||
}
|
||||
|
||||
if typ.IsIOType() {
|
||||
b.printf("wuffs_base__io_buffer %s%s WUFFS_BASE__POTENTIALLY_UNUSED = {};\n", uPrefix, name)
|
||||
b.printf("wuffs_base__io_buffer %s%s WUFFS_BASE__POTENTIALLY_UNUSED = {"+
|
||||
".data = ((wuffs_base__slice_u8){0}),\n"+
|
||||
".meta = ((wuffs_base__io_buffer_meta){0}),\n"+
|
||||
"};\n", uPrefix, name)
|
||||
preName := vPrefix + name
|
||||
// TODO: io0_etc variables?
|
||||
b.printf("uint8_t* %s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", iopPrefix, preName)
|
||||
|
||||
Reference in new issue
Block a user