summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-18 23:02:59 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-18 23:02:59 -0800
commit61abd16ff59debebdacfe0de5050070b5dde46ee (patch)
tree2121409ef6d878412a9ecb71cf6134b1a6974ef3 /lib.h
parent9eddf1e4e0482ca8db81fcc4411fadd01190476c (diff)
downloadtxr-61abd16ff59debebdacfe0de5050070b5dde46ee.tar.gz
txr-61abd16ff59debebdacfe0de5050070b5dde46ee.tar.bz2
txr-61abd16ff59debebdacfe0de5050070b5dde46ee.zip
Following-up on diagnostics obtained by running code through C++
compiler. Idea: allocator functions return char * instead of void *, like malloc did in classic pre-ANSI C. That way we are forced to use a cast except when the target pointer is char * already.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib.h b/lib.h
index 47f33e1a..a11888cc 100644
--- a/lib.h
+++ b/lib.h
@@ -222,9 +222,9 @@ obj_t *none_satisfy(obj_t *list, obj_t *pred, obj_t *key);
long c_num(obj_t *num);
obj_t *nump(obj_t *num);
obj_t *equal(obj_t *left, obj_t *right);
-void *chk_malloc(size_t size);
-void *chk_realloc(void*, size_t size);
-void *chk_strdup(const wchar_t *str);
+char *chk_malloc(size_t size);
+char *chk_realloc(void *, size_t size);
+wchar_t *chk_strdup(const wchar_t *str);
obj_t *cons(obj_t *car, obj_t *cdr);
obj_t *list(obj_t *first, ...); /* terminated by nao */
obj_t *consp(obj_t *obj);