diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-04-11 09:29:27 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-04-11 09:36:24 +1000 |
commit | 5c6703fc637f10f1bbba8fb079f5fdd188ff4efb (patch) | |
tree | a4c4074744f5f5960a696894ded5e1cd2345dfc2 /jim.c | |
parent | 758812fd919e7135b3541e66f416a2dd26596f5f (diff) | |
download | jimtcl-5c6703fc637f10f1bbba8fb079f5fdd188ff4efb.zip jimtcl-5c6703fc637f10f1bbba8fb079f5fdd188ff4efb.tar.gz jimtcl-5c6703fc637f10f1bbba8fb079f5fdd188ff4efb.tar.bz2 |
getref, setref: reference may be qualified
oo.tcl returns globally qualified names like
::<reference.<tree___>.00000000000000000000>
So allow getref and setref to handle these qualified references
Fixes #218
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim.c')
-rw-r--r-- | jim.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -5325,6 +5325,10 @@ static int SetReferenceFromAny(Jim_Interp *interp, Jim_Obj *objPtr) /* Get the string representation */ str = Jim_GetString(objPtr, &len); + if (str[0] == ':' && str[1] == ':') { + str +=2; + len -= 2; + } /* Check if it looks like a reference */ if (len < JIM_REFERENCE_SPACE) goto badformat; |