diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-04-23 14:15:14 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-04-23 14:15:14 (GMT) |
| commit | 466b7d31915ffd26d8c0064dd9b8807699f1c17b (patch) | |
| tree | 805c4003273af068deded070c54d4f0cfa0a3f27 /generic/tclDecls.h | |
| parent | f88d553cbc6e47e3c45dd5bb843e7e7cdd579580 (diff) | |
| parent | 2ef0ed4a5de77d23c3427036743264b107c4c484 (diff) | |
| download | tcl-466b7d31915ffd26d8c0064dd9b8807699f1c17b.zip tcl-466b7d31915ffd26d8c0064dd9b8807699f1c17b.tar.gz tcl-466b7d31915ffd26d8c0064dd9b8807699f1c17b.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) |
