]> git.kaiwu.me - quickjs.git/commit
Improve surrogate handling readability
authorCharlie Gordon <github@chqrlie.org>
Mon, 19 Feb 2024 23:22:32 +0000 (00:22 +0100)
committerCharlie Gordon <github@chqrlie.org>
Mon, 19 Feb 2024 23:22:32 +0000 (00:22 +0100)
commit12c91df5774c5174d6b3191cfc0dbc9cc396755d
tree15ef544f8013562f512ff926291a78666b3a5c4c
parent8d932deb4947d74db9d349648c73c419087a8cea
Improve surrogate handling readability

- add inline function to test and convert surrogates
  is_surrogate(c), is_hi_surrogate(c), is_lo_surrogate(c),
  get_hi_surrogate(c), get_lo_surrogate(c), from_surrogate(hi, lo)
- use names for BC header offsets and lengths in libregexp.c
- remove strict aliasing violations in `lre_exec_backtrack()`
- pass all context variables to XXX_CHAR macros in `lre_exec_backtrack()`
cutils.h
libregexp.c
quickjs.c