Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Cannot invoke cmdInfo.objProc for NRE-enabled commands

Closed / Fixed3399564fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 13 years ago
Descriptionplain2011-08-28 07:01:31
It seems that attempting to use Tcl_GetCommandInfo and then calling the cmdInfo.objProc for NRE-enabled commands does not really work.  No error is generated; however, it appears that the command is not executed.  The code in question is here (on the Fossil tcl-integration branch):

http://www.fossil-scm.org/index.html/artifact?ci=tip&filename=src/th_tcl.c&ln=148-160
msoferplain2011-08-28 21:31:44
That link doesn't work, found instead
https://www.fossil-scm.org/index.html/artifact/9077c7d0f2347a47b5fe30242532fbaf1d63ab77
msoferplain2011-08-28 22:19:55
Can you please provide some evidence/hints as to "appears that the command is not executed", and how NRE-enabled commands enter into the picture?
Note that PURE nre-commands (those that only have an nreProc but no objProc) will bomb (objProc==NULL). These are coroutine, tailcall, yield and also any command created by [coroutine]. For all others commands, things should work properly irrespective of their being NRE-enabled or not.
mistachkinplain2011-08-29 06:43:39
In order for the link to work, I believe you have to at least login as anonymous.
mistachkinplain2011-08-29 15:32:06
I think I have figured out the problem.  The Tcl_EvalObjCmd function calls TclNREvalObjEx; however, TclNRRunCallbacks is never called when Tcl_EvalObjCmd is invoked via the objProc.
msoferplain2011-08-29 17:46:01
allow_comments - 1

Good catch: [eval]'s objProc was actually an nreProc. Fixed in trunk.
jan.nijtmanswiki2013-09-17 11:01:06

Fixed in [6fde6aa738]

Log in (anonymous is fine) to add a comment.