diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-23 14:15:14 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-23 14:15:14 (GMT) |
commit | a05551fb2f2d4f0a8fe3bc93e2afdd7ad0227a7c (patch) | |
tree | 805c4003273af068deded070c54d4f0cfa0a3f27 /generic/tclDecls.h | |
parent | 07ba32a73f1d629e2d4eedadcbed4b165dbcab7f (diff) | |
parent | 7e4b7690f3583ba3196f7e17fec6c8113170ae4b (diff) | |
download | tcl-a05551fb2f2d4f0a8fe3bc93e2afdd7ad0227a7c.zip tcl-a05551fb2f2d4f0a8fe3bc93e2afdd7ad0227a7c.tar.gz tcl-a05551fb2f2d4f0a8fe3bc93e2afdd7ad0227a7c.tar.bz2 |
Implement Tcl_NewBooleanObj, Tcl_DbNewBooleanObj and Tcl_SetBooleanObj as macros using Tcl_NewIntObj, Tcl_DbNewLongObj and Tcl_SetIntObj.
Starting with Tcl 8.5, this is exactly the same, it only eliminates code duplication.
Eliminate use of NO_WIDE_TYPE everywhere: It's exactly the same as TCL_WIDE_INT_IS_LONG
Diffstat (limited to 'generic/tclDecls.h')
-rw-r--r-- | generic/tclDecls.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 0870377..3156f6d 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -3822,6 +3822,15 @@ extern const TclStubs *tclStubsPtr; #define Tcl_GetIndexFromObj(interp, objPtr, tablePtr, msg, flags, indexPtr) \ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, \ sizeof(char *), msg, flags, indexPtr) +#undef Tcl_NewBooleanObj +#define Tcl_NewBooleanObj(boolValue) \ + Tcl_NewIntObj((boolValue)!=0) +#undef Tcl_DbNewBooleanObj +#define Tcl_DbNewBooleanObj(boolValue, file, line) \ + Tcl_DbNewLongObj((boolValue)!=0, file, line) +#undef Tcl_SetBooleanObj +#define Tcl_SetBooleanObj(objPtr, boolValue) \ + Tcl_SetIntObj((objPtr), (boolValue)!=0) #undef Tcl_SetVar #define Tcl_SetVar(interp, varName, newValue, flags) \ Tcl_SetVar2(interp, varName, NULL, newValue, flags) @@ -3847,6 +3856,7 @@ extern const TclStubs *tclStubsPtr; /* * Deprecated Tcl procedures: */ + #undef Tcl_EvalObj #define Tcl_EvalObj(interp,objPtr) \ Tcl_EvalObjEx((interp),(objPtr),0) |