Print nil for nil procedures in fmt.odin

This commit is contained in:
gingerBill
2017-12-12 21:21:55 +00:00
parent f7e9649be4
commit 78b459590c
4 changed files with 31 additions and 38 deletions
+5 -5
View File
@@ -40,12 +40,12 @@ general_stuff :: proc() {
i := i32(137);
ptr := &i;
fp1 := (^f32)(ptr);
_ = (^f32)(ptr);
// ^f32(ptr) == ^(f32(ptr))
fp2 := cast(^f32)ptr;
_ = cast(^f32)ptr;
f1 := (^f32)(ptr)^;
f2 := (cast(^f32)ptr)^;
_ = (^f32)(ptr)^;
_ = (cast(^f32)ptr)^;
// Questions: Should there be two ways to do it?
}
@@ -540,7 +540,7 @@ threading_example :: proc() {
threads := make([dynamic]^thread.Thread, 0, len(prefix_table));
defer free(threads);
for i in 0..len(prefix_table) {
for in prefix_table {
if t := thread.create(worker_proc); t != nil {
t.init_context = context;
t.use_init_context = true;