aboutsummaryrefslogtreecommitdiff
path: root/jim.h
diff options
context:
space:
mode:
authorantirez <antirez>2005-03-11 07:21:42 +0000
committerantirez <antirez>2005-03-11 07:21:42 +0000
commit6a27a322398606fa17338bbb50500e7f9499d128 (patch)
tree155b5266801365139d8ff9fb605e3d2da9a7761e /jim.h
parent41446cff21801a404a276dc1f3dfa9ca2779bfde (diff)
downloadjimtcl-6a27a322398606fa17338bbb50500e7f9499d128.zip
jimtcl-6a27a322398606fa17338bbb50500e7f9499d128.tar.gz
jimtcl-6a27a322398606fa17338bbb50500e7f9499d128.tar.bz2
static variables support
Diffstat (limited to 'jim.h')
-rw-r--r--jim.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/jim.h b/jim.h
index bf1d482..5fd7cd1 100644
--- a/jim.h
+++ b/jim.h
@@ -1,7 +1,7 @@
/* Jim - A small embeddable Tcl interpreter
* Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
*
- * $Id: jim.h,v 1.47 2005/03/10 15:58:28 antirez Exp $
+ * $Id: jim.h,v 1.48 2005/03/11 07:21:42 antirez Exp $
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -349,7 +349,8 @@ typedef struct Jim_ObjType {
/* Call frame */
typedef struct Jim_CallFrame {
unsigned jim_wide id; /* Call Frame ID. Used for caching. */
- struct Jim_HashTable vars;
+ struct Jim_HashTable vars; /* Where local vars are stored */
+ struct Jim_HashTable *staticVars; /* pointer to procedure static vars */
struct Jim_CallFrame *parentCallFrame;
Jim_Obj *const *argv; /* object vector of the current procedure call. */
int argc; /* number of args of the current procedure call. */
@@ -384,6 +385,7 @@ typedef struct Jim_Cmd {
Jim_DelCmdProc delProc; /* Called when the command is deleted if != NULL */
Jim_Obj *argListObjPtr;
Jim_Obj *bodyObjPtr;
+ Jim_HashTable *staticVars; /* Static vars hash table. NULL if no statics. */
int arityMin; /* Min number of arguments. */
int arityMax; /* Max number of arguments. */
} Jim_Cmd;
@@ -583,8 +585,8 @@ JIM_STATIC int JIM_API(Jim_CreateCommand) (Jim_Interp *interp,
const char *cmdName, Jim_CmdProc cmdProc, void *privData,
Jim_DelCmdProc delProc);
JIM_STATIC int JIM_API(Jim_CreateProcedure) (Jim_Interp *interp,
- const char *cmdName, Jim_Obj *argListObjPtr, Jim_Obj *bodyObjPtr,
- int arityMin, int arityMax);
+ const char *cmdName, Jim_Obj *argListObjPtr, Jim_Obj *staticsListObjPtr,
+ Jim_Obj *bodyObjPtr, int arityMin, int arityMax);
JIM_STATIC int JIM_API(Jim_DeleteCommand) (Jim_Interp *interp,
const char *cmdName);
JIM_STATIC int JIM_API(Jim_RenameCommand) (Jim_Interp *interp,