diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-17 13:48:12 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-17 13:48:12 (GMT) |
commit | 831357beb0b7168e132a14e0a4c1e16015db8462 (patch) | |
tree | 2c38bde59af6c90ad19dbda96878de709d5859d0 /generic/tclListObj.c | |
parent | cd18bd65e2e4f265f35f06ab75e62600c1f49006 (diff) | |
download | tcl-831357beb0b7168e132a14e0a4c1e16015db8462.zip tcl-831357beb0b7168e132a14e0a4c1e16015db8462.tar.gz tcl-831357beb0b7168e132a14e0a4c1e16015db8462.tar.bz2 |
Eliminate many usages of Tcl_NewObj (-> TclNewObj) and Tcl_NewIntObj (-> TclNewIntObj or Tcl_NewWideIntObj)
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r-- | generic/tclListObj.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 5a0d45f..332e6aa 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -479,7 +479,9 @@ TclListObjRange( toIdx = listLen-1; } if (fromIdx > toIdx) { - return Tcl_NewObj(); + Tcl_Obj *obj; + TclNewObj(obj); + return obj; } newLen = toIdx - fromIdx + 1; @@ -1379,7 +1381,7 @@ TclLindexFlat( return NULL; } } - listPtr = Tcl_NewObj(); + TclNewObj(listPtr); } else { /* * Extract the pointer to the appropriate element. @@ -1623,7 +1625,7 @@ TclLsetFlat( if (--indexCount) { parentList = subListPtr; if (index == elemCount) { - subListPtr = Tcl_NewObj(); + TclNewObj(subListPtr); } else { subListPtr = elemPtrs[index]; } |