[PATCH 4/5] Check anonstructs a few more times
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: [PATCH 4/5] Check anonstructs a few more times
- From: "S. Gilles" <sgilles@xxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Sun, 10 May 2020 20:38:06 -0400
- To: "myrddin-dev" <myrddin-dev@xxxxxxxxxxxxxx>
- Cc: "S. Gilles" <sgilles@xxxxxxx>
The handling of one anonstruct can create more, e.g. in
struct foo {
union {
struct {
int a;
long a;
} y1;
int y2;
} y;
};
Be slightly less clever about how we handle anonstructs in order to
catch all the member types.
---
myrglue.myr | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/myrglue.myr b/myrglue.myr
index 0a0a5be..cea5ed1 100644
--- a/myrglue.myr
+++ b/myrglue.myr
@@ -63,10 +63,11 @@ const emitmyrproto = {f, ctx
;;
;;
-
- for (i, s) : iter.byenum(anonstructs)
+ var i = 0
+ while i < anonstructs.len
n = std.bfmt(buf[:], "_anon{}", i)
- protostruct(ctx, f, n, s)
+ protostruct(ctx, f, n, anonstructs[i])
+ i++
;;
bio.put(f, ";;\n")
--
2.26.2
| [PATCH 0/5] mcbind patches, round 2 | "S. Gilles" <sgilles@xxxxxxx> |
- Prev by Date: [PATCH 0/5] mcbind patches, round 2
- Previous by thread: [PATCH 5/5] Handle one case of returning struct pointers
- Index(es):