Hi!
As I expected...
Begin forwarded message:
From: Joe English <[EMAIL PROTECTED]>
Date: 23. September 2006 19:15:35 MESZ
To: Tcl Core List <[EMAIL PROTECTED]>
Subject: Re: [TCLCORE] Can Tcl_GetObjResult() return shared object?
Zoran Vasiljevic wrote:
I'm not sure about that, but I had a couple of issues
which I can only track to the above being true
(not 100% confirmed but I suspect seriously).
Is/can that be true?
Yes, that's definitely true. Tcl_GetObjResult() *can* return
a shared object.
If yes, one should avoid constructs like:
Tcl_SetStringObj(Tcl_GetObjResult(interp), thestring,
stringlength);
Yes, one should absolutely avoid such constructs.
It can lead to Tcl_Panic()s when you least expect them.
There used to be a number of them in the core, specifically
the idiom:
Tcl_AppendToObj(Tcl_GetObjResult(interp), ...);
as a replacement for Tcl_AppendResult(). Fortunately most of
these have been fixed by now.
and use:
Tcl_SetObjResult(interp, Tcl_NewStringObj(thestring,
stringlength));
instead [...]?
Yes, do that instead.
--Joe English
----------------------------------------------------------------------
---
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
share your
opinions on IT & business topics through brief surveys -- and earn
cash
http://www.techsay.com/default.php?
page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Tcl-Core mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tcl-core