diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-01-28 21:34:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-01-28 21:34:29 (GMT) |
commit | af3406f86c40c78cff50cb5003b8be0eae448d54 (patch) | |
tree | 8c012550c364d8277f009fec2d98678544ae8d9b /generic/tclProc.c | |
parent | 4247e597c6de977b80205b4c28784465ee05f941 (diff) | |
download | tcl-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/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index f1822a2..8580359 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -80,7 +80,7 @@ const Tcl_ObjType tclProcBodyType = { #define ProcGetIntRep(objPtr, procPtr) \ do { \ const Tcl_ObjIntRep *irPtr; \ - irPtr = Tcl_FetchIntRep((objPtr), &tclProcBodyType); \ + irPtr = TclFetchIntRep((objPtr), &tclProcBodyType); \ (procPtr) = irPtr ? irPtr->twoPtrValue.ptr1 : NULL; \ } while (0) @@ -126,7 +126,7 @@ static const Tcl_ObjType lambdaType = { #define LambdaGetIntRep(objPtr, procPtr, nsObjPtr) \ do { \ const Tcl_ObjIntRep *irPtr; \ - irPtr = Tcl_FetchIntRep((objPtr), &lambdaType); \ + irPtr = TclFetchIntRep((objPtr), &lambdaType); \ (procPtr) = irPtr ? irPtr->twoPtrValue.ptr1 : NULL; \ (nsObjPtr) = irPtr ? irPtr->twoPtrValue.ptr2 : NULL; \ } while (0) @@ -329,7 +329,7 @@ Tcl_ProcObjCmd( * of all procs whose argument list is just _args_ */ - if (Tcl_FetchIntRep(objv[3], &tclProcBodyType)) { + if (TclFetchIntRep(objv[3], &tclProcBodyType)) { goto done; } @@ -794,7 +794,7 @@ TclObjGetFrame( level = curLevel - level; result = 1; } - } else if ((irPtr = Tcl_FetchIntRep(objPtr, &levelReferenceType))) { + } else if ((irPtr = TclFetchIntRep(objPtr, &levelReferenceType))) { level = irPtr->wideValue; result = 1; } else { |