>>>>> Sergei Golovan <[EMAIL PROTECTED]> writes: >> The test program below catches a SIGSEGV when trying to >> Tcl_DecrRefCount () on a Tcl `dict' object: I see no mention of such >> a behaviour as an appropriate one in the documentation as well.
> (After some chatting with Miguel Sofer in Tcler's chatroom) > It's likely a documentation bug. It isn't clear from the docs that > the first thing you have to do is calling TclInitSubsystems(). Yes, the documentation should state it explicitly. > It is possible only indirectly via calling Tcl_FindExecutable() or > Tcl_CreateInterp(). So, adding any of these two function calls at the > very beginning of main() makes crash gone. > See > http://aspn.activestate.com/ASPN/Mail/Message/perl-unix-users/2245821 > for more detailed explanation. Thanks, I've added the following to my program and it seems to work correctly. static void ensure_tcl_initialized (void) { static tcl_initialized_p = 0; if (! tcl_initialized_p) { /* NB: a hack, as per Debian Bug#462409 */ Tcl_Interp *interp = Tcl_CreateInterp (); assert (interp != 0); Tcl_DeleteInterp (interp); tcl_initialized_p = 1; } /* . */ } -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]