about summary refs log tree commit diff stats
path: root/lib/quickjs/libregexp.h
diff options
context:
space:
mode:
authorCharlie Gordon <github@chqrlie.org>2024-02-18 08:29:04 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-02 18:12:24 +0100
commitff2bae1b5519b6ec5dd5abadfe8eead622f6de85 (patch)
tree4f2e8d8937ea19cf16c4116857f144abec98a819 /lib/quickjs/libregexp.h
parente7240962d5131d25a3214ad00b7a66929173862d (diff)
downloadchawan-ff2bae1b5519b6ec5dd5abadfe8eead622f6de85.tar.gz
Fix big endian serialization
Big endian serialization was broken because:
- it partially relied on `WORDS_ENDIAN` (unconditionally undef'd in cutils.h)
- endianness was not handled at all in the bc reader.

Modifications:
- remove `WORDS_ENDIAN`
- use `bc_put_u32()` / `bc_put_u64()` in `JS_WriteBigInt()`
- use `bc_get_u32()` / `bc_get_u64()` in `JS_ReadBigInt()`
- handle host endianness in `bc_get_u16()`, `bc_get_u32()`, `bc_get_u64()` and
  `JS_ReadFunctionBytecode()`

- handle optional littleEndian argument as specified in
  `js_dataview_getValue()` and `js_dataview_setValue()`
Diffstat (limited to 'lib/quickjs/libregexp.h')
0 files changed, 0 insertions, 0 deletions