changeset: 5349:63f247c5da0a
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Mon Oct 18 23:43:03 2010 +0900
files: src/ChangeLog src/emodules.c
description:
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(a)fangorn.uio.no>.
diff -r e4305eb6fb8c -r 63f247c5da0a src/ChangeLog
--- 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(a)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(a)fangorn.uio.no>.
+
2010-06-14 Stephen J. Turnbull <stephen(a)xemacs.org>
* ui-byhand.c:
diff -r e4305eb6fb8c -r 63f247c5da0a src/emodules.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);
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches