]> code.delx.au - gnu-emacs/commit
module_format_fun_env fixes
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Nov 2015 23:45:29 +0000 (15:45 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Nov 2015 23:46:11 +0000 (15:46 -0800)
commit4f10c3cdefc3d858bf297e55fb4a9ced36721bbb
treeb553a9399a6c54c02d5c964055b4c83cbd4ab1e2
parent58dfc16cd0befe0122ecc2c452e48135495519aa
module_format_fun_env fixes

* src/doprnt.c (exprintf) [HAVE_MODULES]: Also define in this case.
* src/emacs-module.c (module_format_fun_env):
Convert path and sym to UTF-8.
Don’t use VLAs, as the C11 standard says they’re optional,
and anyway they can cause core dumps with large allocations.
Use exprintf rather than snprintf, as exprintf handles arbitrarily
long strings.  Simplify the code a bit.
src/doprnt.c
src/emacs-module.c