diff options
| author | gingerBill <bill@gingerbill.org> | 2017-12-21 20:59:23 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-12-21 20:59:23 +0000 |
| commit | ac277a1cce7b42e0e7d6ff9147a2ef4efc7ca541 (patch) | |
| tree | d2335f6188886d9b12360190d4f4154b4cad44c6 /core/fmt.odin | |
| parent | a17310a83c14d708a129559c90610a7a51a147a1 (diff) | |
Revert `map` to be a value type and not a reference type
(Implement code for "const ref" parameters)
Diffstat (limited to 'core/fmt.odin')
| -rw-r--r-- | core/fmt.odin | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fmt.odin b/core/fmt.odin index 81e067282..1ca26855c 100644 --- a/core/fmt.odin +++ b/core/fmt.odin @@ -815,8 +815,9 @@ fmt_value :: proc(fi: ^Fmt_Info, v: any, verb: rune) { write_string(fi.buf, "map["); defer write_byte(fi.buf, ']'); - if (^raw.Map)(v.data).internal != nil { - entries := &(^raw.Map)(v.data).entries; + m := (^raw.Map)(v.data); + if m != nil { + entries := &m.entries; gs := type_info_base(info.generated_struct).variant.(Type_Info_Struct); ed := type_info_base(gs.types[1]).variant.(Type_Info_Dynamic_Array); entry_type := ed.elem.variant.(Type_Info_Struct); |