Arithmatic
This commit is contained in:
+9
-1
@@ -18,6 +18,10 @@ void *lisp_realloc(void *oldptr, size_t size) {
|
||||
}
|
||||
}
|
||||
|
||||
void *lisp_realloc_gmp(void *oldptr, size_t oldsize, size_t size) {
|
||||
return lisp_realloc(oldptr, size);
|
||||
}
|
||||
|
||||
void *lisp_malloc(size_t size) {
|
||||
return lisp_realloc(NULL, size);
|
||||
}
|
||||
@@ -37,6 +41,10 @@ void *lisp_aligned_alloc(size_t alignment, size_t size) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void lisp_free_gmp(void *ptr, size_t size) {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
#define STRING_STREAM_BLOCK_SIZE 32
|
||||
static void ensure_string_stream_space(StringStream *restrict stream,
|
||||
size_t space) {
|
||||
@@ -99,7 +107,7 @@ bool strgetline(const char *restrict buf, size_t buf_length,
|
||||
*start += *length + 1;
|
||||
}
|
||||
size_t left = buf_length - (*start - buf);
|
||||
char *found;
|
||||
const char *found;
|
||||
if ((found = memchr(*start, '\n', left))) {
|
||||
*length = found - *start;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user