summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2018-02-14 13:37:27 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2018-02-14 13:37:27 (GMT)
commit1e854210b71ecee27e16ad922e8f4bb312605114 (patch)
treee4414be4c3e6508533cac7822f3d46dcb0bba124 /generic/tclObj.c
parent7d25e385a2b2816630b16fdfe293c0fddd5e33fe (diff)
downloadtcl-1e854210b71ecee27e16ad922e8f4bb312605114.zip
tcl-1e854210b71ecee27e16ad922e8f4bb312605114.tar.gz
tcl-1e854210b71ecee27e16ad922e8f4bb312605114.tar.bz2
Rewrite documentation in comments for brevity and clarity.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 3bf5b8e..a75ecdd 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -2467,23 +2467,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.
*
*----------------------------------------------------------------------
*/