aboutsummaryrefslogtreecommitdiff
path: root/example/hello_world/hello_libc.zig
diff options
context:
space:
mode:
Diffstat (limited to 'example/hello_world/hello_libc.zig')
-rw-r--r--example/hello_world/hello_libc.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/example/hello_world/hello_libc.zig b/example/hello_world/hello_libc.zig
index 60123c6fd8..60a1f76871 100644
--- a/example/hello_world/hello_libc.zig
+++ b/example/hello_world/hello_libc.zig
@@ -1,5 +1,5 @@
const c = @cImport({
- // See https://github.com/zig-lang/zig/issues/515
+ // See https://github.com/ziglang/zig/issues/515
@cDefine("_NO_CRT_STDIO_INLINE", "1");
@cInclude("stdio.h");
@cInclude("string.h");
@@ -7,9 +7,8 @@ const c = @cImport({
const msg = c"Hello, world!\n";
-export fn main(argc: c_int, argv: &&u8) c_int {
- if (c.printf(msg) != c_int(c.strlen(msg)))
- return -1;
+export fn main(argc: c_int, argv: **u8) c_int {
+ if (c.printf(msg) != @intCast(c_int, c.strlen(msg))) return -1;
return 0;
}