diff --git a/src/hulk/writef.d b/src/hulk/writef.d index 5f183c3..deebe28 100644 --- a/src/hulk/writef.d +++ b/src/hulk/writef.d @@ -88,9 +88,9 @@ size_t writef(string s, va_list args, ch_out_fn ch_out) */ private size_t write_hex(ulong v, bool upper, char pad, size_t width, ch_out_fn ch_out) { - string hex_chars_lower = "0123456789abcdef"; - string hex_chars_upper = "0123456789ABCDEF"; - char[16] buf; + static __gshared string hex_chars_lower = "0123456789abcdef"; + static __gshared string hex_chars_upper = "0123456789ABCDEF"; + static __gshared char[16] buf; size_t i; do { @@ -126,7 +126,7 @@ private size_t write_hex(ulong v, bool upper, char pad, size_t width, ch_out_fn */ private size_t write_udec(ulong v, char pad, size_t width, ch_out_fn ch_out) { - char[20] buf; + static __gshared char[20] buf; size_t i; do {