Artifacts Associated With Ticket 1091046
Ticket change [4873b1cab5] (rid 99886) by davidw on 2004-12-25 09:10:19:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi, In Apache Rivet, we would like to be able to do the equivalent of info script foobar to set the name of the rivet file being parsed and evaluated. I measured a significant, if not huge speedup when I set things directly: Interp *iPtr = (Interp *) interp; if (iPtr->scriptFile != NULL) { Tcl_DecrRefCount(iPtr->scriptFile); } iPtr->scriptFile = Tcl_NewStringObj(r->filename, -1); Tcl_IncrRefCount(iPtr->scriptFile); Instead of building up and evaluating an "info script ...." command. However, we have to use the internal API to do the above... providing a pair of get/set accessor functions would be appreciated. Should I write a TIP for this? Thanks, Dave - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "davidw"
- subsystem initialized to: "37. File System"
- title initialized to: "Accessor functions for iPtr->scriptFile"
- type initialized to: "RFE"
Ticket change [dcdad27eb4] (rid 114558) by hobbs on 2004-12-28 00:52:36:
- icomment:
Logged In: YES user_id=72656 I have a hard time thinking of why C code would be setting the script file, considering this is something meant while sourcing Tcl files ... are you sure you will be handling it correctly?
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [e8002e5d6c] (rid 104571) by davidw on 2004-12-28 01:22:02:
- icomment:
Logged In: YES user_id=240 Well... here's how it's used: There is a file like /var/www/tcl/hello.rvt that gets accessed like http://foo.bar.com/tcl/hello.rvt hello.rvt is a template file that is part HTML, part Tcl, so it doesn't get sourced directly. We would like it to "know its name", so to speak. If there's a better way, we're open to suggestions. Thanks
- login: "davidw"
- mimetype: "text/plain"
- username: "davidw"
- icomment:
Ticket change [2cce79013f] (rid 118970) by hobbs on 2004-12-28 01:28:45:
- icomment:
Logged In: YES user_id=72656 That depends on how you set that all up. Tcl_EvalFile itself does set the scriptFile, but I imagine that you separate out pieces of the code and eval them separately? With so many Tcl_Eval's, it would seem that one more for 'info script' isn't a big deal. You can speed it up by doing Tcl_EvalObjv, but I don't see a big deal in making a C API for this kind of case.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [3d760dd053] (rid 121092) by vincentdarley on 2004-12-29 17:56:31:
- assignee changed to: "dgp"
- subsystem changed to: "38. Init - Library - Autoload"
Ticket change [fafdd6bc56] (rid 261507) by serhiy.storchaka on 2026-11-13 11:18:43:
- closedate changed to: "2461357.9713335303"
- closer changed to: "serhiy.storchaka"
- icomment:
Closing per hobbs' comments: no C accessor for the script file was added, evaluating info script through Tcl_EvalObjv remains the way to set it.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"