Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Protect against Tcl commands with no objProc. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | tcl-integration |
Files: | files | file ages | folders |
SHA1: |
8f6a03f7d18783a83192fb4e7f5c217b |
User & Date: | mistachkin 2011-08-29 00:54:58.409 |
Context
2011-08-29
| ||
01:19 | Add test to verify behavior for missing objProcs. Also, make sure Tcl integration is enabled for the tests. ... (check-in: cba0f25b user: mistachkin tags: tcl-integration) | |
00:54 | Protect against Tcl commands with no objProc. ... (check-in: 8f6a03f7 user: mistachkin tags: tcl-integration) | |
00:28 | Fix comment regarding the value of TCLDIR. ... (check-in: 10f13bc5 user: mistachkin tags: tcl-integration) | |
Changes
Changes to src/th_tcl.c.
︙ | ︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | Tcl_IncrRefCount(objPtr); command = Tcl_GetCommandFromObj(tclInterp, objPtr); if( !command || Tcl_GetCommandInfoFromToken(command,&cmdInfo)==0 ){ Th_ErrorMessage(interp, "Tcl command not found:", argv[1], argl[1]); Tcl_DecrRefCount(objPtr); Tcl_Release((ClientData)tclInterp); return TH_ERROR; } Tcl_DecrRefCount(objPtr); COPY_ARGV_TO_OBJV(); Tcl_ResetResult(tclInterp); rc = cmdInfo.objProc(cmdInfo.objClientData, tclInterp, objc, objv); FREE_ARGV_TO_OBJV(); zResult = getTclResult(tclInterp, &nResult); | > > > > > > | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | Tcl_IncrRefCount(objPtr); command = Tcl_GetCommandFromObj(tclInterp, objPtr); if( !command || Tcl_GetCommandInfoFromToken(command,&cmdInfo)==0 ){ Th_ErrorMessage(interp, "Tcl command not found:", argv[1], argl[1]); Tcl_DecrRefCount(objPtr); Tcl_Release((ClientData)tclInterp); return TH_ERROR; } if( !cmdInfo.objProc ){ Th_ErrorMessage(interp, "Cannot invoke Tcl command:", argv[1], argl[1]); Tcl_DecrRefCount(objPtr); Tcl_Release((ClientData)tclInterp); return TH_ERROR; } Tcl_DecrRefCount(objPtr); COPY_ARGV_TO_OBJV(); Tcl_ResetResult(tclInterp); rc = cmdInfo.objProc(cmdInfo.objClientData, tclInterp, objc, objv); FREE_ARGV_TO_OBJV(); zResult = getTclResult(tclInterp, &nResult); |
︙ | ︙ |