diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2017-11-06 01:33:57 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2017-11-06 01:33:57 (GMT) |
commit | e33f06c4dd3c9724fe8c9fd2105638f060d3becf (patch) | |
tree | 9e9a47459c0b7f41697e665c7ae62b849e3dcc1e /generic/tclObj.c | |
parent | 869affd193c12b5efa7b01372d6a7b381c5d8d26 (diff) | |
download | tcl-e33f06c4dd3c9724fe8c9fd2105638f060d3becf.zip tcl-e33f06c4dd3c9724fe8c9fd2105638f060d3becf.tar.gz tcl-e33f06c4dd3c9724fe8c9fd2105638f060d3becf.tar.bz2 |
Rewrite documentation in comments for brevity and clarity.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index 1a00011..fdbc89a 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -2468,23 +2468,26 @@ Tcl_SetIntObj( * * Tcl_GetIntFromObj -- * - * Attempt to return an int from the Tcl object "objPtr". If the object - * is not already an int, an attempt will be made to convert it to one. + * Retrieve the integer value of 'objPtr'. * - * Integer and long integer objects share the same "integer" type - * implementation. We store all integers as longs and Tcl_GetIntFromObj - * checks whether the current value of the long can be represented by an - * int. + * Value * - * Results: - * The return value is a standard Tcl object result. If an error occurs - * during conversion or if the long integer held by the object can not be - * represented by an int, an error message is left in the interpreter's - * result unless "interp" is NULL. + * TCL_OK * - * Side effects: - * If the object is not already an int, the conversion will free any old - * internal representation. + * Success. + * + * TCL_ERROR + * + * An error occurred during conversion or the integral value can not + * be represented as an integer (it might be too large). An error + * message is left in the interpreter's result if 'interp' is not + * NULL. + * + * Effect + * + * 'objPtr' is converted to an integer if necessary if it is not one + * already. The conversion frees any previously-existing internal + * representation. * *---------------------------------------------------------------------- */ |