Align cgen's private_impl.placeholder

This commit is contained in:
Nigel Tao committed 2019-01-26 09:28:50 +11:00
1 parent f4c5d953ec
commit 89fef4cf5f
2 files changed
+39 -8

No files matched your search

+4 -1
View File
@@ -779,9 +779,12 @@ func (g *gen) writeStruct(b *buffer, n *a.Struct) error {
b.writes("// Even when WUFFS_IMPLEMENTATION is not defined, the outermost struct still\n")
b.writes("// defines C++ convenience methods. These methods forward on \"this\", so that\n")
b.writes("// you can write \"bar->baz(etc)\" instead of \"wuffs_foo__bar__baz(bar, etc)\".\n")
b.writes("struct {\n")
b.writes("private:\n")
b.writes("union {\n")
b.writes("uint32_t align_as_per_magic_field;\n")
b.writes("uint8_t placeholder[1073741824]; // 1 GiB.\n")
b.writes("} private_impl;\n\n")
b.writes("public:\n")
b.writex(wiEnd)
if n.AsNode().AsRaw().Flags()&a.FlagsPublic != 0 {