From f258bd697f57690c34211040d94e1b90055eb886 Mon Sep 17 00:00:00 2001 From: antirez Date: Sat, 9 Apr 2005 12:57:49 +0000 Subject: 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. --- jim.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'jim.h') diff --git a/jim.h b/jim.h index 5240f6a..d939406 100644 --- a/jim.h +++ b/jim.h @@ -2,7 +2,7 @@ * Copyright 2005 Salvatore Sanfilippo * Copyright 2005 Clemens Hintze * - * $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(). */ -- cgit v1.1