diff options
Diffstat (limited to 'src/internal/mdso_object_impl.h')
-rw-r--r-- | src/internal/mdso_object_impl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/internal/mdso_object_impl.h b/src/internal/mdso_object_impl.h index bae8d08..539a77d 100644 --- a/src/internal/mdso_object_impl.h +++ b/src/internal/mdso_object_impl.h @@ -31,3 +31,17 @@ static inline void mdso_obj_write_quad(unsigned char * ch, uint64_t val) ch[6] = val >> 48; ch[7] = val >> 56; } + +static inline void mdso_obj_write_dec(unsigned char * ch, uint64_t dec) +{ + int digits; + uint64_t val; + + *ch = '0'; + + for (digits=0,val=dec; val; digits++) + val /= 10; + + for (val=dec; val; val/=10) + ch[--digits] = (val % 10) + '0'; +} |