diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-03-13 08:38:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-03-13 08:38:18 (GMT) |
commit | 084c8b2259399cfa7c22283d77abb1820207afad (patch) | |
tree | 88e761607718492f5525bd50f6afbb0fa84da34d /generic/tclObj.c | |
parent | 75196e7136a3ae04c019ee0dfa18309ff741cf86 (diff) | |
download | tcl-084c8b2259399cfa7c22283d77abb1820207afad.zip tcl-084c8b2259399cfa7c22283d77abb1820207afad.tar.gz tcl-084c8b2259399cfa7c22283d77abb1820207afad.tar.bz2 |
Eliminate internal use of TclNewBooleanObj()/TclSetBooleanObj()/TclSetIntObj(). Replace Tcl_DbNewBooleanObj() with trivial macro.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index 7ec259f..bfef5fb 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -1732,7 +1732,7 @@ Tcl_InvalidateStringRep( * is coerced to 1. * * When TCL_MEM_DEBUG is defined, this function just returns the result - * of calling the debugging version Tcl_DbNewBooleanObj. + * of calling the debugging version Tcl_DbNewLongObj. * * Results: * The newly created object is returned. This object will have an invalid @@ -1751,7 +1751,7 @@ Tcl_Obj * Tcl_NewBooleanObj( register int boolValue) /* Boolean used to initialize new object. */ { - return Tcl_DbNewBooleanObj(boolValue, "unknown", 0); + return Tcl_DbNewLongObj(boolValue!=0, "unknown", 0); } #else /* if not TCL_MEM_DEBUG */ @@ -1762,7 +1762,7 @@ Tcl_NewBooleanObj( { register Tcl_Obj *objPtr; - TclNewBooleanObj(objPtr, boolValue); + TclNewLongObj(objPtr, boolValue!=0); return objPtr; } #endif /* TCL_MEM_DEBUG */ @@ -1793,6 +1793,7 @@ Tcl_NewBooleanObj( *---------------------------------------------------------------------- */ +#ifndef TCL_NO_DEPRECATED #undef Tcl_DbNewBooleanObj #ifdef TCL_MEM_DEBUG @@ -1827,6 +1828,7 @@ Tcl_DbNewBooleanObj( return Tcl_NewBooleanObj(boolValue); } #endif /* TCL_MEM_DEBUG */ +#endif /* TCL_NO_DEPRECATED */ /* *---------------------------------------------------------------------- @@ -1856,7 +1858,7 @@ Tcl_SetBooleanObj( Tcl_Panic("%s called with shared object", "Tcl_SetBooleanObj"); } - TclSetBooleanObj(objPtr, boolValue); + TclSetLongObj(objPtr, boolValue!=0); } /* @@ -2458,7 +2460,7 @@ Tcl_SetIntObj( Tcl_Panic("%s called with shared object", "Tcl_SetIntObj"); } - TclSetIntObj(objPtr, intValue); + TclSetLongObj(objPtr, intValue); } /* |