This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6948

-- gerrit

commit e0c91037b7daf8289db68de6efba445032520a98
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Mon Apr 25 23:04:49 2022 +0200

    target: fix build with jimtcl 0.79
    
    In jimtcl 0.80 the prototype of Jim_DictPairs() has changed.
    The only code in OpenOCD that uses Jim_DictPairs() has been merged
    recently and it only uses the current jimtcl syntax.
    
    To allow compiling OpenOCD master branch with older versions of
    jimtcl, detect the version of jimtcl and use the appropriate
    syntax.
    
    Change-Id: I6fc78303b6a4db064a97f326c46119f4568e88f3
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>
    Reported-by: dullf...@yahoo.com

diff --git a/src/target/target.c b/src/target/target.c
index 690526eb75..d2dff111a5 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -5222,10 +5222,18 @@ static int target_jim_set_reg(Jim_Interp *interp, int 
argc,
        }
 
        int tmp;
+#if JIM_VERSION >= 80
        Jim_Obj **dict = Jim_DictPairs(interp, argv[1], &tmp);
 
        if (!dict)
                return JIM_ERR;
+#else
+       Jim_Obj **dict;
+       int ret = Jim_DictPairs(interp, argv[1], &dict, &tmp);
+
+       if (ret != JIM_OK)
+               return ret;
+#endif
 
        const unsigned int length = tmp;
        struct command_context *cmd_ctx = current_command_context(interp);

-- 

Reply via email to