In a message dated 2/18/2003 8:15:59 PM Eastern Standard Time, [EMAIL PROTECTED] writes:

>On Tue, Feb 18, 2003 at 07:20:14PM -0500, Jim Davidson wrote:
>>In a message dated 2/18/2003 5:53:54 PM Eastern Standard Time,
>>[EMAIL PROTECTED] writes:
>
>>>- The BB_Nsv* C functions I've created in my nsvapi.c still aren't
>>>working right in some cases, Tcl_GetCommandInfo is still claiming that
>>>"nsv_set", etc. don't exist.  This is despite the fact that the thread
>>>calling these is now being spawned AFTER full server initialization.

Aha!  I tracked that one down.  Turned out it was just that in some
cases, I was still passing in a null Tcl interp when I shouldn't have
been.  I fixed that, and now my app seems to be working fine in 4.0.
Pending further testing anyway.  :)

Incidentally, if you have a null Tcl_interp * and so call
Ns_TclAllocateInterp(NULL) in order to get a pointer to a real interp,
that does NOT work in 4.0, as Ns_TclAllocateInterp just gives you NULL
right back.  In my case I don't actually need to do this, but if you
don't know the virtual server name, what would be the proper way to
get a Tcl interp, since Ns_TclAllocateInterp obviously no longer does
it under 4.0?  Or would this be the Wrong Thing To Do?




Well, in general now it's the Wrong Thing To Do, i.e., you need the virtual server name to get a usable interp in most cases.  If you pass NULL to Ns_TclAllocateInterp it gives you a non-virtual server interp which, among other weirdness, doesn't have the nsv commands because those commands are virtual server specific - clearly :)

This is what Steve Maguire would have called a "Candy Machine Interface" in his very good book Writing Solid Code .  Hmm... perhaps this was a bad idea..  Sorry.

-Jim

I. To remove yourself from this list:

Send a message to "[EMAIL PROTECTED]" with the following text in the BODY of your message:

signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/

Reply via email to