mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 16:55:11 +01:00
lang: allow "slice_var as ptr array[etc] etc"
This commit is contained in:
1 parent
6411561deb
commit
19f56ebfd2
7 files changed
+83
-5
No files matched your search
@@ -342,6 +342,10 @@ func (g *gen) writeVars(b *buffer, f *funk, inStructDecl bool) error {
|
||||
return fmt.Errorf("TODO: support token_{reader,writer} typed variables")
|
||||
}
|
||||
|
||||
if typ.IsPointerType() && typ.IsRecursivelyReadOnly() {
|
||||
b.writes("const ")
|
||||
}
|
||||
|
||||
if err := g.writeCTypeName(b, typ, vPrefix, name); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user