Re: [naviserver-devel] Tcl object handling

2006-09-25 Thread Zoran Vasiljevic
On 25.09.2006, at 11:40, Gustaf Neumann wrote: When doing some tests, it shows that the version with Tcl_NewIntObj() is measurable slower than the version with the reused result object (no wonder) but as well slower than the version with Tcl_ResetResult(). For the following test, i measured th

Re: [naviserver-devel] Tcl object handling

2006-09-25 Thread Gustaf Neumann
Hi, Maybe someon is interested in some findings about the problem with Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); i just workd through the xotcl c code, and found indeed a potential source for the problem (in the non-frequently used XOTclOIsMixinMethod() call) and fixed it. It is my underst

Re: [naviserver-devel] Tcl object handling

2006-09-23 Thread Zoran Vasiljevic
On 23.09.2006, at 13:37, Gustaf Neumann wrote: Not sure, what's faster, resetResult() + setIntObj() or setObjResult() + newIntObj(). The difference in speed is most likely not significant. however, resetResult allows to append to the object, clears error state, etc. I believe that either/or i

Re: [naviserver-devel] Tcl object handling

2006-09-23 Thread Gustaf Neumann
Zoran Vasiljevic schrieb: Hi! After I have observed some very subtle and hard-to-reproduce bugs in our app, I found out that Tcl object handling in some places in NS code, although "by the book" is really a source of trouble. Like: Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); /* Unsafe? */

[naviserver-devel] Tcl object handling

2006-09-23 Thread Zoran Vasiljevic
Hi! After I have observed some very subtle and hard-to-reproduce bugs in our app, I found out that Tcl object handling in some places in NS code, although "by the book" is really a source of trouble. Like: Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); /* Unsafe? */ This construct assumes tha