diff options
author | default <nobody@localhost> | 2023-09-03 20:22:32 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-09-03 20:22:32 +0200 |
commit | 8535fc84c92e42ca379558b3c0a3a9a2d0faedaa (patch) | |
tree | 115bddc23890b45322a5088cb4308696f22820cf /xs.h | |
parent | e3fbb807ff7f1a5b5e893da996b583053103fb18 (diff) |
Backport from xs.
Diffstat (limited to 'xs.h')
-rw-r--r-- | xs.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -28,9 +28,6 @@ typedef enum { } xstype; -/* dynamic strings */ -typedef char d_char; - /* types */ typedef char xs_val; typedef char xs_str; @@ -157,7 +154,7 @@ xs_val xs_stock_dict[] = { XSTYPE_DICT, 0, 0, 5, XSTYPE_EOM }; void *_xs_realloc(void *ptr, size_t size, const char *file, int line, const char *func) { - d_char *ndata = realloc(ptr, size); + xs_val *ndata = realloc(ptr, size); if (ndata == NULL) { fprintf(stderr, "**OUT OF MEMORY**\n"); @@ -530,7 +527,7 @@ int xs_starts_and_ends(const char *prefix, const char *str, const char *suffix) xs_str *xs_crop_i(xs_str *str, int start, int end) -/* crops the d_char to be only from start to end */ +/* crops the string to be only from start to end */ { XS_ASSERT_TYPE(str, XSTYPE_STRING); |