diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-23 10:39:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-23 10:39:33 (GMT) |
commit | cb37c28cf9df9a8ebdca318c7f03f697e5b5ee7d (patch) | |
tree | 1bc0bc631c40f95af5a19d0b893abb7791875b17 /generic/tclDecls.h | |
parent | 9c56563bbe703e1bd7c267c6a43c8f62b978ae11 (diff) | |
download | tcl-cb37c28cf9df9a8ebdca318c7f03f697e5b5ee7d.zip tcl-cb37c28cf9df9a8ebdca318c7f03f697e5b5ee7d.tar.gz tcl-cb37c28cf9df9a8ebdca318c7f03f697e5b5ee7d.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.
Diffstat (limited to 'generic/tclDecls.h')
-rw-r--r-- | generic/tclDecls.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 30e305b..77402f8 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -6560,6 +6560,15 @@ extern 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) @@ -6585,6 +6594,7 @@ extern TclStubs *tclStubsPtr; /* * Deprecated Tcl procedures: */ + #undef Tcl_EvalObj #define Tcl_EvalObj(interp,objPtr) \ Tcl_EvalObjEx((interp),(objPtr),0) @@ -6593,4 +6603,3 @@ extern TclStubs *tclStubsPtr; Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL) #endif /* _TCLDECLS */ - |