Skip to content

Commit

Permalink
Merge d4bd71d into 64c7eea
Browse files Browse the repository at this point in the history
  • Loading branch information
pkhuong committed Dec 22, 2017
2 parents 64c7eea + d4bd71d commit c5a000d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/an_itoa.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#ifndef AN_ITOA_H
#define AN_ITOA_H
/**
* Fast unsigned integer to decimal string conversion code. The code
* ONLY WORKS ON LITTLE ENDIAN machines, and will be slow on hardware
* with bad support for unaligned stores.
*
* Unlike regular itoa, the result is *not* NUL-terminated, and the
* routines are allowed to write garbage bytes in the destination
* buffer after the decimal string, as long as they stay in bounds:
* `an_itoa` never writes past `out[9]`, and `an_ltoa` past `out[19]`.
*
* Porting this to big endian should only necessitate a byteswap
* before writing to memory, but we've never needed to support BE.
*/

#include "an_cc.h"

AN_EXTERN_C_BEGIN
Expand Down

0 comments on commit c5a000d

Please sign in to comment.