No registered users in community xowiki
in last 10 minutes
in last 10 minutes
Re: [Xotcl] Bug in 1.5.*
From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Sun, 14 Jan 2007 15:22:52 +0100
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
_at_@ -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;
}
Date: Sun, 14 Jan 2007 15:22:52 +0100
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
_at_@ -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;
}