aboutsummaryrefslogtreecommitdiff
path: root/jim.h
diff options
context:
space:
mode:
authoroharboe <oharboe>2008-11-07 06:59:26 +0000
committeroharboe <oharboe>2008-11-07 06:59:26 +0000
commit28d407ceb6f5865e8d5621136eead9b3eff0dc00 (patch)
tree75aed1df6a697d815abccf301ec458f73b2a22ca /jim.h
parent3fca2f6819789d79cb2b3df742e3b2231f21f756 (diff)
downloadjimtcl-28d407ceb6f5865e8d5621136eead9b3eff0dc00.zip
jimtcl-28d407ceb6f5865e8d5621136eead9b3eff0dc00.tar.gz
jimtcl-28d407ceb6f5865e8d5621136eead9b3eff0dc00.tar.bz2
* jim.c, jim.h: Prevent infinite recursion if an unknown command is
called from unknown
Diffstat (limited to 'jim.h')
-rw-r--r--jim.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/jim.h b/jim.h
index a48d04c..490b65b 100644
--- a/jim.h
+++ b/jim.h
@@ -530,6 +530,7 @@ typedef struct Jim_Interp {
struct Jim_HashTable sharedStrings; /* Shared Strings hash table */
Jim_Obj *stackTrace; /* Stack trace object. */
Jim_Obj *unknown; /* Unknown command cache */
+ int unknown_called; /* The unknown command has been invoked */
int errorFlag; /* Set if an error occurred during execution. */
int evalRetcodeLevel; /* Level where the last return with code JIM_EVAL
happened. */
@@ -560,6 +561,7 @@ typedef struct Jim_Interp {
* cached can no longer considered valid. */
#define Jim_InterpIncrProcEpoch(i) (i)->procEpoch++
#define Jim_SetResultString(i,s,l) Jim_SetResult(i, Jim_NewStringObj(i,s,l))
+#define Jim_SetResultInt(i,intval) Jim_SetResult(i, Jim_NewIntObj(i,intval))
#define Jim_SetEmptyResult(i) Jim_SetResult(i, (i)->emptyObj)
#define Jim_GetResult(i) ((i)->result)
#define Jim_CmdPrivData(i) ((i)->cmdPrivData)