diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-21 09:31:24 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-21 09:31:24 -0800 |
commit | cb7bdc3ea72f234d333e119ecd9fdb85b55faafe (patch) | |
tree | 28e1b605af4722179b1cc3055fd27ce38b648d84 /src/library.js | |
parent | e71ed8514296ab1fabfa2340b17480a60e8c9100 (diff) | |
parent | ac28698a41d8cb1eb944947abe8a5a98a9f137c0 (diff) |
Merge pull request #2139 from TV4Fun/memfixes
Fix errors in locale and allocate, and a few other tweaks
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index 326e24f0..91d5f925 100644 --- a/src/library.js +++ b/src/library.js @@ -6445,7 +6445,19 @@ LibraryManager.library = { // var indexes = Runtime.calculateStructAlignment({ fields: ['i32', 'i32'] }); var me = _localeconv; if (!me.ret) { - me.ret = allocate([allocate(intArrayFromString('.'), 'i8', ALLOC_NORMAL)], 'i8*', ALLOC_NORMAL); // just decimal point, for now + // These are defaults from the "C" locale + me.ret = allocate([ + allocate(intArrayFromString('.'), 'i8', ALLOC_NORMAL),0,0,0, // decimal_point + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0, // thousands_sep + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0, // grouping + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0, // int_curr_symbol + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0, // currency_symbol + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0, // mon_decimal_point + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0, // mon_thousands_sep + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0, // mon_grouping + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0, // positive_sign + allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL),0,0,0 // negative_sign + ], 'i8*', ALLOC_NORMAL); // Allocate strings in lconv, still don't allocate chars } return me.ret; }, |