diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-09-08 15:18:45 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-09-08 16:06:02 +0200 |
| commit | 4124c041ed2e3b497ede72fdae229aa2c6aca249 (patch) | |
| tree | e8488449de6f0be54b9c79547352829b998833d3 /Makefile | |
| parent | 5a64e3193924c7e503dddb10a99989148b26e922 (diff) | |
| download | chawan-4124c041ed2e3b497ede72fdae229aa2c6aca249.tar.gz | |
utils: add twtuni
std/unicode has the following issues:
* Rune is an int32, which implies overflow checking. Also, it is
distinct, so you have to convert it manually to do arithmetic.
* QJS libunicode and Chagashi work with uint32, interfacing with these
required pointless type conversions.
* fastRuneAt is a template, meaning it's pasted into every call
site. Also, it decodes to UCS-4, so it generates two branches that
aren't even used. Overall this lead to quite some code bloat.
* fastRuneAt and lastRune have frustratingly different
interfaces. Writing code to handle both cases is error prone.
* On older Nim versions which we still support, std/unicode takes
strings, not openArray[char]'s.
Replace it with "twtuni", which includes some improved versions of
the few procedures from std/unicode that we actually use.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -91,7 +91,7 @@ $(OUTDIR_CGI_BIN)/gmifetch: adapter/protocol/gmifetch.c @mkdir -p "$(OUTDIR_CGI_BIN)" $(CC) $(GMIFETCH_CFLAGS) adapter/protocol/gmifetch.c -o "$(OUTDIR_CGI_BIN)/gmifetch" $(GMIFETCH_LDFLAGS) -twtstr = src/utils/twtstr.nim src/utils/charcategory.nim src/utils/map.nim +twtstr = src/utils/twtstr.nim src/utils/charcategory.nim src/utils/map.nim src/utils/twtuni.nim dynstream = src/io/dynstream.nim src/io/serversocket.nim $(OUTDIR_CGI_BIN)/man: lib/monoucha/monoucha/jsregex.nim \ lib/monoucha/monoucha/libregexp.nim src/types/opt.nim $(twtstr) |