[PATCH 1/5] Re-use typename sanitiziation to handle identifiers
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: [PATCH 1/5] Re-use typename sanitiziation to handle identifiers
- From: "S. Gilles" <sgilles@xxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Sun, 10 May 2020 20:38:03 -0400
- To: "myrddin-dev" <myrddin-dev@xxxxxxxxxxxxxx>
- Cc: "S. Gilles" <sgilles@xxxxxxx>
Caused by libxcb calling struct members "type" in a few places.
---
myrglue.myr | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/myrglue.myr b/myrglue.myr
index 4827dff..c9cd975 100644
--- a/myrglue.myr
+++ b/myrglue.myr
@@ -84,7 +84,9 @@ const protostruct = {f, name, ty : cb.cstruct#
bio.put(f, "\ttype {}{} = struct\n", pfx, name)
for (mname, mty) : ty.membs
match mname
- | `std.Some n: bio.put(f, "\t\t{} : ", n)
+ | `std.Some n:
+ pfx = myrname(n) ? "_" : ""
+ bio.put(f, "\t\t{}{} : ", pfx, n)
| `std.None: bio.put(f, "\t\t_a{} : ", nanon++)
;;
myrtype(f, &mty)
--
2.26.2
| [PATCH 0/5] mcbind patches, round 2 | "S. Gilles" <sgilles@xxxxxxx> |
- Next by Date: [PATCH 2/5] Mirror prefix-stripping from myrglue in cglue
- Previous by thread: [PATCH 0/5] mcbind patches, round 2
- Next by thread: [PATCH 2/5] Mirror prefix-stripping from myrglue in cglue
- Index(es):