[naviserver-devel] Ns_VarGet vs. NsTclNsvGetObjCmd

2019-01-31 Thread Andrew Piskorski
I know that the Tcl nsv_get command is implemented by NsTclNsvGetObjCmd(). But in the NaviServer C code, what is Ns_VarGet() for? I don't see it used anywhere. Is Ns_VarGet() a C interface to exact same nsv_get functionality, or is it for something completely different? -- Andrew Piskorski _

[naviserver-devel] store C pointers in Nsv vs. Tcl_HashTable?

2019-01-31 Thread Andrew Piskorski
I'm using a C library that allocates some opaque structure, and returns a pointer to it. I'd like to save that pointer in a safe process-wide place, generate my own unique integer key (easy), and then return that simple key as a handle to my Tcl code. I also need to be able to find and use the C