+2021-08-07 Bruno Haible <bruno@clisp.org>
+
+ malloca: Tweak last commit.
+ * lib/malloca.h: Keep use and declaration of mmalloca close together.
+
2021-08-07 Bruno Haible <bruno@clisp.org>
dirname-lgpl, sh-quote, system-quote, xstriconv: Clean up includes.
# define safe_alloca(N) ((void) (N), NULL)
#endif
+/* Free a block of memory allocated through malloca(). */
+#if HAVE_ALLOCA
+extern void freea (void *p);
+#else
+# define freea free
+#endif
+
/* malloca(N) is a safe variant of alloca(N). It allocates N bytes of
memory allocated on the stack, that must be freed using freea() before
the function returns. Upon failure, it returns NULL. */
# define malloca(N) \
mmalloca (N)
#endif
-
-/* Free a block of memory allocated through malloca(). */
-#if HAVE_ALLOCA
-extern void freea (void *p);
-#else
-# define freea free
-#endif
-
extern void *mmalloca (size_t n)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (freea, 1)
_GL_ATTRIBUTE_ALLOC_SIZE ((1));