Skip to content

Commit

Permalink
fix jl_static_show formatting for long long printing (ref JuliaLang#8402
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vtjnash authored and waTeim committed Nov 23, 2014
1 parent 3074910 commit 276351d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,32 +1162,32 @@ DLLEXPORT size_t jl_static_show(JL_STREAM *out, jl_value_t *v)
n += JL_PRINTF(out, "#<intrinsic function %d>", *(uint32_t*)jl_data_ptr(v));
}
else if (jl_is_int64(v)) {
n += JL_PRINTF(out, "%d", jl_unbox_int64(v));
n += JL_PRINTF(out, "%lld", jl_unbox_int64(v));
}
else if (jl_is_int32(v)) {
n += JL_PRINTF(out, "%d", jl_unbox_int32(v));
}
else if (jl_typeis(v,jl_int16_type)) {
n += JL_PRINTF(out, "%d", jl_unbox_int16(v));
n += JL_PRINTF(out, "%hd", jl_unbox_int16(v));
}
else if (jl_typeis(v,jl_int8_type)) {
n += JL_PRINTF(out, "%d", jl_unbox_int8(v));
n += JL_PRINTF(out, "%hhd", jl_unbox_int8(v));
}
else if (jl_is_uint64(v)) {
n += JL_PRINTF(out, "0x%016x", jl_unbox_uint64(v));
n += JL_PRINTF(out, "0x%016llx", jl_unbox_uint64(v));
}
else if (jl_is_uint32(v)) {
n += JL_PRINTF(out, "0x%08x", jl_unbox_uint32(v));
}
else if (jl_typeis(v,jl_uint16_type)) {
n += JL_PRINTF(out, "0x%04x", jl_unbox_uint16(v));
n += JL_PRINTF(out, "0x%04hx", jl_unbox_uint16(v));
}
else if (jl_typeis(v,jl_uint8_type)) {
n += JL_PRINTF(out, "0x%02x", jl_unbox_uint8(v));
n += JL_PRINTF(out, "0x%02hhx", jl_unbox_uint8(v));
}
else if (jl_is_cpointer(v)) {
#ifdef _P64
n += JL_PRINTF(out, "0x%016x", jl_unbox_voidpointer(v));
n += JL_PRINTF(out, "0x%016llx", jl_unbox_voidpointer(v));
#else
n += JL_PRINTF(out, "0x%08x", jl_unbox_voidpointer(v));
#endif
Expand Down

0 comments on commit 276351d

Please sign in to comment.