summaryrefslogtreecommitdiffstats
path: root/generic/tclDictObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-28 21:34:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-28 21:34:29 (GMT)
commitaf3406f86c40c78cff50cb5003b8be0eae448d54 (patch)
tree8c012550c364d8277f009fec2d98678544ae8d9b /generic/tclDictObj.c
parent4247e597c6de977b80205b4c28784465ee05f941 (diff)
downloadtcl-af3406f86c40c78cff50cb5003b8be0eae448d54.zip
tcl-af3406f86c40c78cff50cb5003b8be0eae448d54.tar.gz
tcl-af3406f86c40c78cff50cb5003b8be0eae448d54.tar.bz2
New internal macro TclFetchIntRep, which is faster than Tcl_FetchIntRep.
But ... don't use this function when the result is only compared to NULL: that's just overkill.
Diffstat (limited to 'generic/tclDictObj.c')
-rw-r--r--generic/tclDictObj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index 13ff0f8..629a3f0 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -173,7 +173,7 @@ const Tcl_ObjType tclDictType = {
#define DictGetIntRep(objPtr, dictRepPtr) \
do { \
const Tcl_ObjIntRep *irPtr; \
- irPtr = Tcl_FetchIntRep((objPtr), &tclDictType); \
+ irPtr = TclFetchIntRep((objPtr), &tclDictType); \
(dictRepPtr) = irPtr ? irPtr->twoPtrValue.ptr1 : NULL; \
} while (0)
@@ -623,7 +623,7 @@ SetDictFromAny(
* the conversion from lists to dictionaries.
*/
- if (Tcl_FetchIntRep(objPtr, &tclListType)) {
+ if (objPtr->typePtr == &tclListType) {
int objc, i;
Tcl_Obj **objv;