ref: 5aaf4d7e6e7eb9e55bf314a2db83ab25b834b4fb
parent: fd1b8b6f31b7a8c2705c3ac01e46fd707c0d3c9e
author: Ori Bernstein <[email protected]>
date: Mon Dec 4 19:08:10 EST 2017
Fix function pointer formatting.
--- a/lib/std/fmt.myr
+++ b/lib/std/fmt.myr
@@ -267,6 +267,7 @@
var l_val : int64, ul_val : uint64
var z_val : size
var p_val : byte#
+ var f_val : intptr[2]
var c_val : char
var s_val : byte[:]
var f32_val : flt32, f64_val : flt64
@@ -354,13 +355,16 @@
vabytes(ap)
;;
| `Tyfunc tc:
- p_val = vanext(ap)
+ f_val = vanext(ap)
sbputs(sb, "func{")
intfmt(sb, \
[.base=16, .padto=2*sizeof(void#), .padfill='0'], \
- false, (p_val : intptr))
+ false, (f_val[0] : intptr))
+ sbputs(sb, ", ")
+ intfmt(sb, \
+ [.base=16, .padto=2*sizeof(void#), .padfill='0'], \
+ false, (f_val[1] : intptr))
sbputs(sb, "}")
- vabytes(ap)
| `Tyarray (sz, desc):
subap = vaenter(ap)
sbputs(sb, "[")