diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2015-12-12 00:10:37 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2015-12-12 00:10:37 -0700 |
| commit | a10277bd949d47370e427d4457d93e907de9a6f7 (patch) | |
| tree | 4f5ca4247559c679a5a04ea0816c2c78f90211ed /std/std.zig | |
| parent | 4c16eaa6401786e6c2de84d7c9f231107d6f2cb7 (diff) | |
| download | zig-a10277bd949d47370e427d4457d93e907de9a6f7.tar.gz zig-a10277bd949d47370e427d4457d93e907de9a6f7.zip | |
prepare codebase for struct and string support
parsing code for structs, strings, and c string literals
partial semantic analyzing code for structs, strings, and c string literals
Diffstat (limited to 'std/std.zig')
| -rw-r--r-- | std/std.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/std/std.zig b/std/std.zig index 4e523e0015..a05a21650f 100644 --- a/std/std.zig +++ b/std/std.zig @@ -17,8 +17,11 @@ fn syscall3(number: isize, arg1: isize, arg2: isize, arg3: isize) -> isize { // TODO zig strings instead of C strings // TODO handle buffering and flushing // TODO non-i32 integer literals so we can remove the casts -pub fn print_str(str : *const u8, len: isize) { +// TODO constants for SYS_write and stdout_fileno +//pub fn print_str(str : string) -> isize { +pub fn print_str(str : *const u8, len: isize) -> isize { let SYS_write = 1; let stdout_fileno = 1; - syscall3(SYS_write as isize, stdout_fileno as isize, str as isize, len); + //return syscall3(SYS_write as isize, stdout_fileno as isize, str.ptr as isize, str.len as isize); + return syscall3(SYS_write as isize, stdout_fileno as isize, str as isize, len); } |
