summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-05-03 18:07:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-05-03 18:07:34 (GMT)
commit8f1d72dfe0e08b09f9985440a5e4f682804224ed (patch)
treeb6fcb467e2e876bcc285aba2c7258bb0988cbe54 /generic/tclResult.c
parent76995b15620ca1eecef253001cd60a1a961b6605 (diff)
downloadtcl-8f1d72dfe0e08b09f9985440a5e4f682804224ed.zip
tcl-8f1d72dfe0e08b09f9985440a5e4f682804224ed.tar.gz
tcl-8f1d72dfe0e08b09f9985440a5e4f682804224ed.tar.bz2
* doc/DString.3: Eliminated use of identifier "string" in Tcl's
* doc/Environment.3: public C API to avoid conflict/confusion with * doc/Eval.3: the std::string of C++. * doc/ExprLong.3, doc/ExprLongObj.3, doc/GetInt.3, doc/GetOpnFl.3: * doc/ParseCmd.3, doc/RegExp.3, doc/SetResult.3, doc/StrMatch.3: * doc/Utf.3, generic/tcl.decls, generic/tclBasic.c, generic/tclEnv.c: * generic/tclGet.c, generic/tclParse.c, generic/tclParseExpr.c: * generic/tclRegexp.c, generic/tclResult.c, generic/tclUtf.c: * generic/tclUtil.c, unix/tclUnixChan.c: * generic/tclDecls.h: `make genstubs`
Diffstat (limited to 'generic/tclResult.c')
-rw-r--r--generic/tclResult.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 28f994d..bf00083 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.23 2004/11/23 00:12:57 dkf Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.24 2005/05/03 18:08:20 dgp Exp $
*/
#include "tclInt.h"
@@ -381,23 +381,23 @@ Tcl_DiscardResult(statePtr)
*
* Tcl_SetResult --
*
- * Arrange for "string" to be the Tcl return value.
+ * Arrange for "result" to be the Tcl return value.
*
* Results:
* None.
*
* Side effects:
- * interp->result is left pointing either to "string" (if "copy" is 0)
- * or to a copy of string. Also, the object result is reset.
+ * interp->result is left pointing either to "result"
+ * or to a copy of it. Also, the object result is reset.
*
*----------------------------------------------------------------------
*/
void
-Tcl_SetResult(interp, stringPtr, freeProc)
+Tcl_SetResult(interp, result, freeProc)
Tcl_Interp *interp; /* Interpreter with which to associate the
* return value. */
- register char *stringPtr; /* Value to be returned. If NULL, the
+ register char *result; /* Value to be returned. If NULL, the
* result is set to an empty string. */
Tcl_FreeProc *freeProc; /* Gives information about the string:
* TCL_STATIC, TCL_VOLATILE, or the address
@@ -408,12 +408,12 @@ Tcl_SetResult(interp, stringPtr, freeProc)
register Tcl_FreeProc *oldFreeProc = iPtr->freeProc;
char *oldResult = iPtr->result;
- if (stringPtr == NULL) {
+ if (result == NULL) {
iPtr->resultSpace[0] = 0;
iPtr->result = iPtr->resultSpace;
iPtr->freeProc = 0;
} else if (freeProc == TCL_VOLATILE) {
- length = strlen(stringPtr);
+ length = strlen(result);
if (length > TCL_RESULT_SIZE) {
iPtr->result = (char *) ckalloc((unsigned) length+1);
iPtr->freeProc = TCL_DYNAMIC;
@@ -421,9 +421,9 @@ Tcl_SetResult(interp, stringPtr, freeProc)
iPtr->result = iPtr->resultSpace;
iPtr->freeProc = 0;
}
- strcpy(iPtr->result, stringPtr);
+ strcpy(iPtr->result, result);
} else {
- iPtr->result = stringPtr;
+ iPtr->result = result;
iPtr->freeProc = freeProc;
}
@@ -706,10 +706,10 @@ Tcl_AppendResult TCL_VARARGS_DEF(Tcl_Interp *,arg1)
*/
void
-Tcl_AppendElement(interp, stringPtr)
+Tcl_AppendElement(interp, element)
Tcl_Interp *interp; /* Interpreter whose result is to be
* extended. */
- CONST char *stringPtr; /* String to convert to list element and
+ CONST char *element; /* String to convert to list element and
* add to result. */
{
Interp *iPtr = (Interp *) interp;
@@ -729,7 +729,7 @@ Tcl_AppendElement(interp, stringPtr)
* needed to accommodate the list element.
*/
- size = Tcl_ScanElement(stringPtr, &flags) + 1;
+ size = Tcl_ScanElement(element, &flags) + 1;
if ((iPtr->result != iPtr->appendResult)
|| (iPtr->appendResult[iPtr->appendUsed] != 0)
|| ((size + iPtr->appendUsed) >= iPtr->appendAvl)) {
@@ -753,7 +753,7 @@ Tcl_AppendElement(interp, stringPtr)
*/
flags |= TCL_DONT_QUOTE_HASH;
}
- iPtr->appendUsed += Tcl_ConvertElement(stringPtr, dst, flags);
+ iPtr->appendUsed += Tcl_ConvertElement(element, dst, flags);
}
/*