]> Savannah Git Hosting - gnulib.git/commit
regex: remove alloca usage on regex set_regs
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Jan 2021 20:00:09 +0000 (12:00 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Jan 2021 20:02:04 +0000 (12:02 -0800)
commitb6207ab38053b606bc80703f785e4334a62e8205
treed4dd267544698002b059ed395ccd33abf6400067
parent921d2ea19b5eb70293bf110070f04064fd5c9193
regex: remove alloca usage on regex set_regs

Derived from this patch by Adhemerval Zanella:
https://sourceware.org/pipermail/libc-alpha/2021-January/121372.html
* lib/regex_internal.h: Include dynarray.h, for Gnulib.
* lib/regexec.c (DYNARRAY_STRUCT, DYNARRAY_ELEMENT)
(DYNARRAY_PREFIX): New macros.
Include malloc/dynarray-skeleton.c.
(set_regs): Use dynarray rather than alloca.
* modules/regex (Depends-on): Add dynarray.
ChangeLog
lib/regex_internal.h
lib/regexec.c
modules/regex