Forum OpenACS Q&A: CriTCL: inlined C in TCL

Collapse
Posted by Jonathan Ellis on
Patrick posted about this in Development but that seems to have died so I thought I'd re-post to hopefully a wider audience here.
I played with it some but got stuck.

basically how critcl works is the cproc method (as well as ccommand) sets up some global stuff, then calls the "define" proc, which adds an entry to ::auto_index telling the interpreter it can get the method by calling critcl::cbuild.

this works great from the commandline, but nsd ignores the ::auto_index and errors with "invalid command name" when you try to invoke anything. cbuild never gets called. I can invoke it manually so it's not a problem with cbuild. (If it were, there should be an "error while autoloading..." message.)

auto_index has zero documentation (unless you call "Used by auto_load to save the index information read from disk." documentation) so it's hard to debug... for fun I ran "grep -ri auto_index" in the nsd source tree but came up with nothing.

nsd 3.5.1, tcl 8.4.1, btw.