aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2012-02-28 14:08:38 +1000
committerSteve Bennett <steveb@workware.net.au>2013-03-14 10:10:44 +1000
commit35eff1766cc2dd2528f70349ab5522247ed0b40c (patch)
tree8a8a8c05c4aa4232c04184dadb1995234f63fd2f
parentef270df21c9a4691bb4f042ebe174bde71afa4b2 (diff)
downloadjimtcl-35eff1766cc2dd2528f70349ab5522247ed0b40c.zip
jimtcl-35eff1766cc2dd2528f70349ab5522247ed0b40c.tar.gz
jimtcl-35eff1766cc2dd2528f70349ab5522247ed0b40c.tar.bz2
Trivial optimisation
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/jim.c b/jim.c
index 5837ee7..d7b8b6d 100644
--- a/jim.c
+++ b/jim.c
@@ -127,6 +127,7 @@ static int ListSetIndex(Jim_Interp *interp, Jim_Obj *listPtr, int listindex, Jim
static int JimDeleteLocalProcs(Jim_Interp *interp, Jim_Stack *localCommands);
static Jim_Obj *JimExpandDictSugar(Jim_Interp *interp, Jim_Obj *objPtr);
static void SetDictSubstFromAny(Jim_Interp *interp, Jim_Obj *objPtr);
+static Jim_Obj **JimDictPairs(Jim_Obj *dictPtr, int *len);
static void JimSetFailedEnumResult(Jim_Interp *interp, const char *arg, const char *badtype,
const char *prefix, const char *const *tablePtr, const char *name);
static int JimCallProcedure(Jim_Interp *interp, Jim_Cmd *cmd, int argc, Jim_Obj *const *argv);
@@ -6197,7 +6198,7 @@ static int SetListFromAny(Jim_Interp *interp, struct Jim_Obj *objPtr)
int len;
int i;
- Jim_DictPairs(interp, objPtr, &listObjPtrPtr, &len);
+ listObjPtrPtr = JimDictPairs(objPtr, &len);
for (i = 0; i < len; i++) {
Jim_IncrRefCount(listObjPtrPtr[i]);
}