diff options
author | antirez <antirez> | 2005-04-09 12:57:49 +0000 |
---|---|---|
committer | antirez <antirez> | 2005-04-09 12:57:49 +0000 |
commit | f258bd697f57690c34211040d94e1b90055eb886 (patch) | |
tree | b651fb8f6c853668e41e1f6d024a208bbf438d91 /jim.h | |
parent | 7bde0b834586a0064eda2893d3c4c3f9bd0a8278 (diff) | |
download | jimtcl-f258bd697f57690c34211040d94e1b90055eb886.zip jimtcl-f258bd697f57690c34211040d94e1b90055eb886.tar.gz jimtcl-f258bd697f57690c34211040d94e1b90055eb886.tar.bz2 |
Experimental verison of JIM_EVAL retcode in order to implement
what RHS proposed in the Wiki for tail recursion:
return -code eval [list proc $a $b ...]
I'm not sure I'll take this, but it needs to be inside for some
time in order to experiment and evaluate it I guess.
Diffstat (limited to 'jim.h')
-rw-r--r-- | jim.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2,7 +2,7 @@ * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * Copyright 2005 Clemens Hintze <c.hintze@gmx.net> * - * $Id: jim.h,v 1.70 2005/04/06 10:14:09 patthoyts Exp $ + * $Id: jim.h,v 1.71 2005/04/09 12:57:49 antirez Exp $ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -116,6 +116,7 @@ extern "C" { #define JIM_RETURN 2 #define JIM_BREAK 3 #define JIM_CONTINUE 4 +#define JIM_EVAL 5 #define JIM_MAX_NESTING_DEPTH 10000 /* default max nesting depth */ /* Some function get an integer argument with flags to change @@ -467,6 +468,8 @@ typedef struct Jim_Interp { Jim_Obj *stackTrace; /* Stack trace object. */ Jim_Obj *unknown; /* Unknown command cache */ int errorFlag; /* Set if an error occurred during execution. */ + int evalRetcodeFlag; /* True if the current script is executed as result + of a JIM_EVAL retcode. */ void *cmdPrivData; /* Used to pass the private data pointer to a command. It is set to what the user specified via Jim_CreateCommand(). */ |