diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-06 21:15:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-06 21:15:23 -0700 |
commit | 1b5801edf62f8bfed9a2f88e88a0195518ba4976 (patch) | |
tree | f28c962166d31408728f22b855412e9475871a69 /lib.h | |
parent | d8e5052e3714fbede5b52a1706ed22d7e745d849 (diff) | |
download | txr-1b5801edf62f8bfed9a2f88e88a0195518ba4976.tar.gz txr-1b5801edf62f8bfed9a2f88e88a0195518ba4976.tar.bz2 txr-1b5801edf62f8bfed9a2f88e88a0195518ba4976.zip |
linenoise: use checked allocator for strdup.
* lib.c (chk_strdup_utf8): New function.
* lib.h (chk_strdup_utf8): Declared.
* linenoise/linenoise.c (chk_strdup_utf8): Declared.
(edit_history_next, linenoise, lino_hist_add): Use
chk_strdup_utf8 instead of strdup.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -531,6 +531,7 @@ mem_t *chk_realloc(mem_t *, size_t size); mem_t *chk_grow_vec(mem_t *old, size_t oldelems, size_t newelems, size_t elsize); wchar_t *chk_strdup(const wchar_t *str); +char *chk_strdup_utf8(const char *str); val cons(val car, val cdr); val make_lazy_cons(val func); val make_half_lazy_cons(val func, val car); |