[GRASS5] NVIZ and threaded TCL 8.4 working

Glynn Clements glynn at gclements.plus.com
Tue Mar 14 22:24:49 EST 2006


Cedric Shock wrote:

> My tcl and tk 8.4 binaries are Ubuntu, which are probably pretty similar to 
> debian's.
> 
> Many of the nviz c source files call Tcl_Merge to make return strings, and 
> assign them to interp->result where interp is the TCL interpreter like this:
> 
> interp->result = Tcl_Merge(3, list);
> 
> Then they set the freeProc ("function" to call to free the memory) to be free 
> (glibc). Tcl_Merge allocates its memory with Tcl_Alloc, not with malloc. 
> Before 8.4 Tcl_Alloc just happened to be malloc, but it's not anymore. The 
> correct thing to do is to set the freeProc to be TCL_DYNAMIC, which will be 
> TCL's opposite of Tcl_Alloc, like this:
> 
> interp->freeProc = TCL_DYNAMIC;

Will this also work in 8.3?

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list