[Xotcl] Bug in 1.5.*
Gustaf Neumann
neumann at wu-wien.ac.at
Sun Jan 14 15:22:52 CET 2007
Kristoffer Lawson schrieb:
> Here is some code that worked before:
Kristoffer, yes this was a bug, error message propagation from methods
called by configure did not work properly. This bug was introduced
by making xotcl more robust against panics that might occure, when
append result is called with a shared object, resetting the result and
the inner error message in this case.
Below is a small patch, that will go into the next versions of xotcl.
Many thanks for the report...
-gustaf neumann
--- generic/xotcl.c-orig 2006-11-24 12:54:10.000000000 +0100
+++ generic/xotcl.c 2007-01-14 15:09:39.000000000 +0100
@@ -9141,8 +9141,11 @@
methodName, argc+1, obj, result); */
if (result != TCL_OK) {
- XOTclVarErrMsg(in, " during '", ObjStr(obj->cmdName), " ",
+ Tcl_Obj *res = Tcl_DuplicateObj(Tcl_GetObjResult(in)); /* save the
result */
+ INCR_REF_COUNT(res);
+ XOTclVarErrMsg(in, ObjStr(res), " during '", ObjStr(obj->cmdName), " ",
methodName, "'", (char *) NULL);
+ DECR_REF_COUNT(res);
}
return result;
}
More information about the Xotcl
mailing list