diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-04-06 17:34:56 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-04-06 17:51:35 -0700 |
commit | a1cbbe4664a9c06b40f8e5d489ea574537b78945 (patch) | |
tree | b6da7ed488af1540730a50ad0760ea5b1445b062 /lib/xmalloca.h | |
parent | 372b1f317894d6916a94cd3fd08361fe270206b2 (diff) | |
download | gnulib-a1cbbe4664a9c06b40f8e5d489ea574537b78945.tar.gz |
xalloc-oversized: export xalloc_count_t
* lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
* lib/xmalloca.h (nmalloca):
Comment re restrictions on arg types.
* lib/xalloc-oversized.h (xalloc_count_t): Rename from
__xalloc_count_type; all uses changed. This publicizes the type.
Diffstat (limited to 'lib/xmalloca.h')
-rw-r--r-- | lib/xmalloca.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/xmalloca.h b/lib/xmalloca.h index cbaa89d73c..a87a336b62 100644 --- a/lib/xmalloca.h +++ b/lib/xmalloca.h @@ -45,7 +45,8 @@ extern void * xmmalloca (size_t n); /* xnmalloca(N,S) is an overflow-safe variant of xmalloca (N * S). It allocates an array of N objects, each with S bytes of memory, - on the stack. S must be positive and N must be nonnegative. + on the stack. S must be positive and N must be nonnegative, + and at least one of N and S should be ptrdiff_t or size_t or wider. The array must be freed using freea() before the function returns. Upon failure, it exits with an error message. */ #if HAVE_ALLOCA |