Skip to content

Commit 6c92270

Browse files
committed
---
yaml --- r: 5052 b: refs/heads/master c: fc0212a h: refs/heads/master v: v3
1 parent 5aa0a6a commit 6c92270

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c6a47e4087c226bf61964fe1105b47328553a8aa
2+
refs/heads/master: fc0212a63bf888008cffe256663317e3472fbab4

trunk/src/rt/rust_shape.h

+19-1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,24 @@ get_u16_bump(const uint8_t *&addr) {
168168
return result;
169169
}
170170

171+
template<typename T>
172+
inline void
173+
fmt_number(std::ostream &out, T n) {
174+
out << n;
175+
}
176+
177+
// Override the character interpretation for these two.
178+
template<>
179+
inline void
180+
fmt_number<uint8_t>(std::ostream &out, uint8_t n) {
181+
out << (int)n;
182+
}
183+
template<>
184+
inline void
185+
fmt_number<int8_t>(std::ostream &out, int8_t n) {
186+
out << (int)n;
187+
}
188+
171189

172190
// Contexts
173191

@@ -1015,7 +1033,7 @@ class log : public data<log,ptr> {
10151033
const type_param *params, const uint8_t *end_sp, bool live);
10161034

10171035
template<typename T>
1018-
void walk_number() { out << get_dp<T>(dp); }
1036+
inline void walk_number() { fmt_number(out, get_dp<T>(dp)); }
10191037

10201038
public:
10211039
log(rust_task *in_task,

0 commit comments

Comments
 (0)