On Sat, May 04, 2002 at 01:31:42AM -0400, Dossy wrote:
> Could you not call NsTclVSetCmd() yourself?  Look in
> nsd/tclvar.c ...

Hm.  NsTclVSetCmd() does stuff to or with the Tcl interpretor, and I
don't HAVE any convenient local "interp" pointer in my C function to
pass is.  Should I be passing the interp pointer into my C function,
so I can use it for things like NsTclVSetCmd()?

But then, I should check the return value in the Tcl interp or
something to figure out what actually happened?  I dunno.  (Clearly
though, that wouldn't be any worse than the non-existant error
checking I have in my BB_NsvSet() using Ns_TclEval() right now.)

Basically, I don't understand why NsTclVSetCmd() is implemented the
way it is, rather than as a pair of two functions:
  1. NsVSetCmd() function for use by C which does not use any Tcl
interp at all.
  2. NsTclVSetCmd() which implements the nsv_set Tcl command and calls
NsVSetCmd() to do the actual work.

--
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com

Reply via email to