aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-01-08 02:52:27 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-01-08 02:52:27 -0700
commite1f498212c74c48d740b959484123478dec748ff (patch)
treefe16f946e263c2474fe081c6f02f2aff8c9162bc /std
parent9aea99a999997e223307d8559e0ff9fa613839a3 (diff)
downloadzig-e1f498212c74c48d740b959484123478dec748ff.tar.gz
zig-e1f498212c74c48d740b959484123478dec748ff.zip
fix codegen for implicit maybe wrap
Diffstat (limited to 'std')
-rw-r--r--std/builtin.zig6
-rw-r--r--std/std.zig2
2 files changed, 1 insertions, 7 deletions
diff --git a/std/builtin.zig b/std/builtin.zig
index 0e78eb01bb..dbb69644d5 100644
--- a/std/builtin.zig
+++ b/std/builtin.zig
@@ -1,12 +1,6 @@
// These functions are provided when not linking against libc because LLVM
// sometimes generates code that calls them.
-// In the future we may put these functions in separate compile units, make them .o files,
-// and then use
-// ar rcs foo.a foo.o memcpy.o memset.o
-// ld -o foo foo.a
-// This will omit the machine code if the function is unused.
-
export fn memset(dest: &u8, c: u8, n: usize) -> &u8 {
var index : #typeof(n) = 0;
while (index != n) {
diff --git a/std/std.zig b/std/std.zig
index 333896cadc..411f59b423 100644
--- a/std/std.zig
+++ b/std/std.zig
@@ -42,7 +42,7 @@ pub fn print_i64(x: i64) -> isize {
/*
// TODO error handling
pub fn readline(buf: []u8) -> ?[]u8 {
- var index = 0;
+ var index : usize = 0;
while (index < buf.len) {
// TODO unknown size array indexing operator
const err = read(stdin_fileno, &buf.ptr[index], 1);