summaryrefslogtreecommitdiffstats
path: root/doc/BoolObj.3
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2002-08-07 17:13:54 (GMT)
committermsofer <msofer@noemail.net>2002-08-07 17:13:54 (GMT)
commit5d9c0ae5a674553635e339b424dee15776fd3130 (patch)
tree4b479dab81a27fd43eb5971e3ee74d9719d5439d /doc/BoolObj.3
parent70df6c832d86d7fad3c9dd0a0849144320e24c6e (diff)
downloadtcl-5d9c0ae5a674553635e339b424dee15776fd3130.zip
tcl-5d9c0ae5a674553635e339b424dee15776fd3130.tar.gz
tcl-5d9c0ae5a674553635e339b424dee15776fd3130.tar.bz2
* docs/BoolObj.3: added description of valid string reps for a
boolean object [Bug 584794] * generic/tclObj.c: optimised Tcl_GetBooleanFromObj and SetBooleanFromAny to avoid parsing the string rep when it can be avoided [Bugs 584650, 472576] FossilOrigin-Name: 599315865e4f3792820aea2488c3e23e1be95f9a
Diffstat (limited to 'doc/BoolObj.3')
-rw-r--r--doc/BoolObj.38
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/BoolObj.3 b/doc/BoolObj.3
index 2306350..c6409dc 100644
--- a/doc/BoolObj.3
+++ b/doc/BoolObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: BoolObj.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
+'\" RCS: @(#) $Id: BoolObj.3,v 1.3 2002/08/07 17:13:56 msofer Exp $
'\"
.so man.macros
.TH Tcl_BooleanObj 3 8.0 Tcl "Tcl Library Procedures"
@@ -75,6 +75,12 @@ Otherwise, \fBTcl_GetBooleanFromObj\fR returns \fBTCL_OK\fR
and stores the boolean value in the address given by \fIboolPtr\fR.
If the object is not already a boolean object,
the conversion will free any old internal representation.
+Objects having a string representation equal to any of \fB0\fR,
+\fBfalse\fR, \fBno\fR, or \fBoff\fR have a boolean value 0; if the
+string representation is any of \fB1\fR, \fBtrue\fR, \fByes\fR, or
+\fBon\fR the boolean value is 1.
+Any of these string values may be abbreviated, and upper-case spellings
+are also acceptable.
.SH "SEE ALSO"
Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult