std: delete malloc and free

later we'll add a full featured allocator instead of this
This commit is contained in:
Andrew Kelley
2016-02-12 02:23:22 -07:00
parent 592210a173
commit 7828456b30
5 changed files with 6 additions and 52 deletions

View File

@@ -1023,25 +1023,6 @@ pub fn main(args: [][]u8) -> %void {
}
)SOURCE", "OK\n");
add_simple_case("malloc and free", R"SOURCE(
import "mem.zig";
import "std.zig";
pub fn main(args: [][]u8) -> %void {
var ptr = malloc(1) ?? unreachable{};
*ptr = 6;
if (*ptr != 6) {
%%stdout.printf("BAD\n");
}
free(ptr);
%%stdout.printf("OK\n");
}
)SOURCE", "OK\n");
add_simple_case("store member function in variable", R"SOURCE(
import "std.zig";
struct Foo {