X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/8c7d6a3de82ca7fcbdfa6ad31c3bf70f63c6a069..83cd972a1a7f536a8be5c0e7504768c3fb7298f4:/lib/xalloc.h?ds=sidebyside diff --git a/lib/xalloc.h b/lib/xalloc.h index 098a6c2e..c84bccb8 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -83,5 +83,9 @@ char *xstrdup PARAMS ((const char *str)); /* Return a malloc'ed copy of SRC. */ # define CLONE(Src) CCLONE (Src, 1) +/* Wrappers for standard functions. */ +#define CALLOC(t, n) ((t *) calloc (sizeof (t), (n))) +#define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n))) +#define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n))) #endif /* !XALLOC_H_ */