aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2020-10-31 15:25:14 +0200
committerGitHub <noreply@github.com>2020-10-31 15:25:14 +0200
commit9ca9819488db580241a93ded7b93a054de2db8af (patch)
tree8ec0a042513823c789ab28bcca6a004c2163e6f8 /src/codegen
parent7c8d9cfa40ab96aede2a7fe8ec9dce6f10bc910a (diff)
parent28a0583b844654bec108a456eb619efb2af201a1 (diff)
downloadzig-9ca9819488db580241a93ded7b93a054de2db8af.tar.gz
zig-9ca9819488db580241a93ded7b93a054de2db8af.zip
Merge pull request #6883 from Vexu/translate-c
translate-c: correctly handle pointers to opaque demoted structs
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/c.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index 2d98729721..e562ce320e 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -91,7 +91,7 @@ fn genArray(file: *C, decl: *Decl) !void {
if (tv.val.cast(Value.Payload.Bytes)) |payload|
if (tv.ty.sentinel()) |sentinel|
if (sentinel.toUnsignedInt() == 0)
- // TODO: static by default
+ // TODO: static by default
try file.constants.writer().print("const char *const {} = \"{}\";\n", .{ name, payload.data })
else
return file.fail(decl.src(), "TODO byte arrays with non-zero sentinels", .{})