summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-08 13:28:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-08 13:28:06 (GMT)
commitce11fef50dff5048c2dfa81c6639fbb6a65b51e0 (patch)
treee98a894ddce06416177582863563bdfd99a39e79 /generic/tclBasic.c
parent7ca3af3ebfc7d24e2f628a1fc5b2058c2d9410c2 (diff)
parent98040fe8bcb5786e0e2743bc32dc10b576f86f93 (diff)
downloadtcl-ce11fef50dff5048c2dfa81c6639fbb6a65b51e0.zip
tcl-ce11fef50dff5048c2dfa81c6639fbb6a65b51e0.tar.gz
tcl-ce11fef50dff5048c2dfa81c6639fbb6a65b51e0.tar.bz2
Merge trunk.
Eliminate all usage of internal macros: TclNewIntObj, TclNewBooleanObj, TclSetIntObj, TclSetBooleanObj. Change various function to macros: Tcl_NewIntObj, Tcl_SetIntObj, Tcl_NewBooleanObj, Tcl_DbNewBooleanObj, Tcl_SetBooleanObj, Tcl_AddErrorInfo, Tcl_AddObjErrorInfo.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c65
1 files changed, 2 insertions, 63 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index b13ef18..d31777e 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -6202,72 +6202,10 @@ Tcl_AppendObjToErrorInfo(
Tcl_Obj *objPtr) /* Message to record. */
{
int length;
+ register Interp *iPtr = (Interp *) interp;
const char *message = TclGetStringFromObj(objPtr, &length);
Tcl_IncrRefCount(objPtr);
- Tcl_AddObjErrorInfo(interp, message, length);
- Tcl_DecrRefCount(objPtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * Tcl_AddErrorInfo --
- *
- * Add information to the errorInfo field that describes the current
- * error.
- *
- * Results:
- * None.
- *
- * Side effects:
- * The contents of message are appended to the errorInfo field. If we are
- * just starting to log an error, errorInfo is initialized from the error
- * message in the interpreter's result.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tcl_AddErrorInfo(
- Tcl_Interp *interp, /* Interpreter to which error information
- * pertains. */
- const char *message) /* Message to record. */
-{
- Tcl_AddObjErrorInfo(interp, message, -1);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * Tcl_AddObjErrorInfo --
- *
- * Add information to the errorInfo field that describes the current
- * error. This routine differs from Tcl_AddErrorInfo by taking a byte
- * pointer and length.
- *
- * Results:
- * None.
- *
- * Side effects:
- * "length" bytes from "message" are appended to the errorInfo field. If
- * "length" is negative, use bytes up to the first NULL byte. If we are
- * just starting to log an error, errorInfo is initialized from the error
- * message in the interpreter's result.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tcl_AddObjErrorInfo(
- Tcl_Interp *interp, /* Interpreter to which error information
- * pertains. */
- const char *message, /* Points to the first byte of an array of
- * bytes of the message. */
- int length) /* The number of bytes in the message. If < 0,
- * then append all bytes up to a NULL byte. */
-{
- register Interp *iPtr = (Interp *) interp;
/*
* If we are just starting to log an error, errorInfo is initialized from
@@ -6295,6 +6233,7 @@ Tcl_AddObjErrorInfo(
}
Tcl_AppendToObj(iPtr->errorInfo, message, length);
}
+ Tcl_DecrRefCount(objPtr);
}
/*