Mercurial > hg > xemacs-beta
changeset 5293:63f247c5da0a
In emodules_load(), dereference f = dll_variable() once more.
We then use EXTERNAL_TO_ITEXT on it, which returns an alloca'd
string, so I delete the unneeded alloca copy statements.
Fixes error reported by Anders Odberg, confirmed in
<rfawrpfhm3l.fsf@fangorn.uio.no>.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Mon, 18 Oct 2010 23:43:03 +0900 |
parents | e4305eb6fb8c |
children | bbff29a01820 |
files | src/ChangeLog src/emodules.c |
diffstat | 2 files changed, 12 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Oct 18 23:21:23 2010 +0900 +++ b/src/ChangeLog Mon Oct 18 23:43:03 2010 +0900 @@ -1,3 +1,12 @@ +2010-07-06 Stephen J. Turnbull <stephen@xemacs.org> + + * emodules.c (emodules_load): + Add one more dereference on f = dll_variable() in three places. + We then use EXTERNAL_TO_ITEXT on it, which returns an alloca'd + string, so I delete the unneeded alloca copy statements. + Fixes error reported by Anders Odberg, confirmed in + <rfawrpfhm3l.fsf@fangorn.uio.no>. + 2010-06-14 Stephen J. Turnbull <stephen@xemacs.org> * ui-byhand.c:
--- a/src/emodules.c Mon Oct 18 23:21:23 2010 +0900 +++ b/src/emodules.c Mon Oct 18 23:43:03 2010 +0900 @@ -390,11 +390,7 @@ (const Ibyte *) "emodule_name"); if (f == NULL || *f == NULL) signal_error (Qdll_error, "Invalid dynamic module: Missing symbol `emodule_name'", Qunbound); - - mname = EXTERNAL_TO_ITEXT (f, Qemodule_string_encoding); - /* #### Not obvious we have to force an alloca copy here, but the old - code did so */ - IBYTE_STRING_TO_ALLOCA (mname, mname); + mname = EXTERNAL_TO_ITEXT (*f, Qemodule_string_encoding); if (mname[0] == '\0') signal_error (Qdll_error, "Invalid dynamic module: Empty value for `emodule_name'", Qunbound); @@ -403,21 +399,13 @@ (const Ibyte *) "emodule_version"); if (f == NULL || *f == NULL) signal_error (Qdll_error, "Missing symbol `emodule_version': Invalid dynamic module", Qunbound); - - mver = EXTERNAL_TO_ITEXT (f, Qemodule_string_encoding); - /* #### Not obvious we have to force an alloca copy here, but the old - code did so */ - IBYTE_STRING_TO_ALLOCA (mver, mver); + mver = EXTERNAL_TO_ITEXT (*f, Qemodule_string_encoding); f = (const Extbyte **) dll_variable (dlhandle, (const Ibyte *) "emodule_title"); if (f == NULL || *f == NULL) signal_error (Qdll_error, "Invalid dynamic module: Missing symbol `emodule_title'", Qunbound); - - mtitle = EXTERNAL_TO_ITEXT (f, Qemodule_string_encoding); - /* #### Not obvious we have to force an alloca copy here, but the old - code did so */ - IBYTE_STRING_TO_ALLOCA (mtitle, mtitle); + mtitle = EXTERNAL_TO_ITEXT (*f, Qemodule_string_encoding); symname = alloca_ibytes (qxestrlen (mname) + 15);