From: Vlad S. <vl...@cr...> - 2006-04-18 13:52:27
|
You convinced me that at this moment ns_tls is not appropriate, i will remove it Zoran Vasiljevic wrote: > > On 16.04.2006, at 19:20, Vlad Seryakov wrote: > >> >> Using Ns_Tls in C looks very usafull, why not having the same in Tcl >> as well? > > I belive what you did not "sell" correctly is the ability > to have C and Tcl interface to same data in a "simple" manner. > Because in my eyes, this is the major "pro". > > Normally, I would not buy ns_tls interface if it were just > a replacement for setting a global variable in Tcl. Because > you can very simply setup a tiny Tcl wrapper: > > proc ns_tls_set {key val} > set private::tls($key) $val > } > proc ns_tls_get {key} > set private::tls($key) > } > > (add some more simple code if you'd be using > [interp create] or such...) > > But the fact that you can access the same things > from C code makes ns_tls worth considering (still, you need > to have some conventions in place about data-types...) > > A good example of this dual interface is ns_config. > It can be used from C and Tcl, which is why I was contemplating > of adding more features there (perhaps allowing read/write operations > after server startup). > > I haven't check the implementation but you need to be careful > if you plan to store Tcl_Obj's references there. I can't recall eactly > but there might be problems when you make some Tcl_Obj's jump the > interpreters... > > Cheers > Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |