summaryrefslogtreecommitdiffstats
path: root/generic/tclEvent.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-09-27 16:24:18 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-09-27 16:24:18 (GMT)
commit6221ab7a6f6578462654bc7ab0b8e16a329ee2c4 (patch)
tree8a7068f53d54e39daa4c910b8308983bc42fb514 /generic/tclEvent.c
parent8089322eae4074cd7cec783ef2fa50e4600064b9 (diff)
downloadtcl-6221ab7a6f6578462654bc7ab0b8e16a329ee2c4.zip
tcl-6221ab7a6f6578462654bc7ab0b8e16a329ee2c4.tar.gz
tcl-6221ab7a6f6578462654bc7ab0b8e16a329ee2c4.tar.bz2
* generic/tclBasic.c: Removed internal routines TclInvoke,
* generic/tclInt.decls: TclGlobalInvoke, TclObjInvokeGlobal and * tests/basic.test: the portion of TclObjInvoke that handles calls without TCL_INVOKE_HIDDEN enabled. None of this code is called any longer within the core, and the superior public interface, Tcl_EvalObjv, is available for any external callers. * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclEvent.c (HandleBgErrors): Updated [bgerror] invocations to make use of Tcl_Obj based routines, dropping the calls to TclGlobalInvoke()
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r--generic/tclEvent.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index bd4bfae..292e09b 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEvent.c,v 1.45 2004/07/30 15:16:16 dgp Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.46 2004/09/27 16:24:24 dgp Exp $
*/
#include "tclInt.h"
@@ -242,14 +242,17 @@ HandleBgErrors(clientData)
ClientData clientData; /* Pointer to ErrAssocData structure. */
{
Tcl_Interp *interp;
- CONST char *argv[2];
int code;
BgError *errPtr;
ErrAssocData *assocPtr = (ErrAssocData *) clientData;
Tcl_Channel errChannel;
+ Tcl_Obj *objv[2];
+
+ objv[0] = Tcl_NewStringObj("bgerror", -1);
+ Tcl_IncrRefCount(objv[0]);
+ objv[1] = NULL;
Tcl_Preserve((ClientData) assocPtr);
-
while (assocPtr->firstBgPtr != NULL) {
interp = assocPtr->firstBgPtr->interp;
if (interp == NULL) {
@@ -270,12 +273,12 @@ HandleBgErrors(clientData)
* Create and invoke the bgerror command.
*/
- argv[0] = "bgerror";
- argv[1] = assocPtr->firstBgPtr->errorMsg;
+ objv[1] = Tcl_NewStringObj(assocPtr->firstBgPtr->errorMsg, -1);
+ Tcl_IncrRefCount(objv[1]);
Tcl_AllowExceptions(interp);
Tcl_Preserve((ClientData) interp);
- code = TclGlobalInvoke(interp, 2, argv, 0);
+ code = Tcl_EvalObjv(interp, 2, objv, TCL_EVAL_GLOBAL);
if (code == TCL_ERROR) {
/*
@@ -293,7 +296,7 @@ HandleBgErrors(clientData)
Tcl_SavedResult save;
Tcl_SaveResult(interp, &save);
- TclGlobalInvoke(interp, 2, argv, TCL_INVOKE_HIDDEN);
+ TclObjInvoke(interp, 2, objv, TCL_INVOKE_HIDDEN);
Tcl_RestoreResult(interp, &save);
goto doneWithInterp;
@@ -347,6 +350,10 @@ HandleBgErrors(clientData)
*/
doneWithInterp:
+ if (objv[1]) {
+ Tcl_DecrRefCount(objv[1]);
+ objv[1] = NULL;
+ }
if (assocPtr->firstBgPtr) {
ckfree(assocPtr->firstBgPtr->errorMsg);
@@ -362,6 +369,7 @@ doneWithInterp:
}
}
assocPtr->lastBgPtr = NULL;
+ Tcl_DecrRefCount(objv[0]);
Tcl_Release((ClientData) assocPtr);
}