APPROVE COMMIT 21.5
Per confirmation of fix:
Anders Odberg writes:
[Stephen J Turnbull]
| Anders Odberg writes:
| > I'm still wondering if anybody else is able to reproduce this problem,
| > or if I am the only one seeing this behaviour.
|
| OK, I see something. Try this patch:
Perfect, works like a charm. Thanks a lot! :-)
Regards,
-Anders.
diff -r e4305eb6fb8c src/ChangeLog
--- a/src/ChangeLog Mon Oct 18 23:21:23 2010 +0900
+++ b/src/ChangeLog Mon Oct 18 23:36:55 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 src/emodules.c
--- a/src/emodules.c Mon Oct 18 23:21:23 2010 +0900
+++ b/src/emodules.c Mon Oct 18 23:36:55 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