Remove unused "#ifdef"-related cgen strings
@@ -577,6 +577,11 @@ func (g *gen) generate() ([]byte, error) {
return *b, nil
}
+var (
+ wiStartImpl = []byte("\n// WUFFS C HEADER ENDS HERE.\n#ifdef WUFFS_IMPLEMENTATION\n\n")
+ wiEnd = []byte("\n#endif // WUFFS_IMPLEMENTATION\n\n")
+)
+
func (g *gen) genIncludes(b *buffer) error {
b.writes("#if defined(WUFFS_IMPLEMENTATION) && !defined(WUFFS_CONFIG__MODULES)\n")
b.writes("#define WUFFS_CONFIG__MODULES\n")
@@ -1122,13 +1127,6 @@ func (g *gen) writeCppMethods(b *buffer, n *a.Struct) error {
return nil
}
-var (
- wiStartImpl = []byte("\n// WUFFS C HEADER ENDS HERE.\n#ifdef WUFFS_IMPLEMENTATION\n\n")
- wiStart = []byte("\n#ifdef WUFFS_IMPLEMENTATION\n\n")
- wiElse = []byte("\n#else // WUFFS_IMPLEMENTATION\n\n")
- wiEnd = []byte("\n#endif // WUFFS_IMPLEMENTATION\n\n")
-)
-
func (g *gen) writeVTableImpl(b *buffer, n *a.Struct) error {
impls := n.Implements()
if len(impls) == 0 {
