core: Address XXX, make static constants for strings used when stringifying floats

This commit is contained in:
Tim Chevalier
2013-02-28 16:48:22 -08:00
parent 5680ec0270
commit 405a35c7f8
2 changed files with 10 additions and 4 deletions

View File

@@ -1832,6 +1832,13 @@ const tag_five_b: uint = 248u;
const max_five_b: uint = 67108864u;
const tag_six_b: uint = 252u;
// Constants used for converting strs to floats
pub const inf_buf: [u8*3] = ['i' as u8, 'n' as u8, 'f' as u8];
pub const positive_inf_buf: [u8*4] = ['+' as u8, 'i' as u8,
'n' as u8, 'f' as u8];
pub const negative_inf_buf: [u8*4] = ['-' as u8, 'i' as u8,
'n' as u8, 'f' as u8];
pub const nan_buf: [u8*3] = ['N' as u8, 'a' as u8, 'N' as u8];
/**
* Work with the byte buffer of a string.