> From Rob Mayoff discussion of Zoran Vasiljevic nsv_* improvements it seems
> that in some cases it's improper to change strings to Tcl_Objs.

It's only improper in places where values might be accessed from
multiple threads. Here are some APIs that cannot be blindly objectified:

    ns_share
    nsv_*
    ns_register_*
    ns_schedule_*
    ns_atexit
    ns_atshutdown
    ns_atsignal

> I would like to see more detailed discussion of *what* and *how* it
> should be done, especially from AOL people that proposed this change.

If you need to save the value of a Tcl_Obj somewhere that could be
accessed from another thread, don't. Call Tcl_GetStringFromObj and save
the returned string instead.

If the saved value will only be accessed from the original thread, then
it's fine to just call Tcl_IncrRefCount on the Tcl_Obj and then store a
pointer to the Tcl_Obj.

Reply via email to