aboutsummaryrefslogtreecommitdiff
path: root/jim.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-09-16 10:01:27 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:54 +1000
commitb4a77b8c3c18870009b5a2c193a1772552b5e4b5 (patch)
tree10bc85e5e1a702f07547b6cd0ee8fc077d03cd99 /jim.c
parent1f3eccbfe50172710a1190bd1d13f03778d587a1 (diff)
downloadjimtcl-b4a77b8c3c18870009b5a2c193a1772552b5e4b5.zip
jimtcl-b4a77b8c3c18870009b5a2c193a1772552b5e4b5.tar.gz
jimtcl-b4a77b8c3c18870009b5a2c193a1772552b5e4b5.tar.bz2
eventloop improvements and enhancements
Move Jim_EvalObjBackground() out of the core to eventloop Time events are now kept and triggered in time order Time handlers are removed before execution Add 'update' Add 'after info' and 'after idle' Include time events in the return from Jim_ProcessEvents() Add Tcl eventloop tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim.c')
-rw-r--r--jim.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/jim.c b/jim.c
index 732253f..b083473 100644
--- a/jim.c
+++ b/jim.c
@@ -4670,7 +4670,6 @@ Jim_Interp *Jim_CreateInterp(void)
i->unknown = Jim_NewStringObj(i, "unknown", -1);
i->unknown_called = 0;
i->errorProc = i->emptyObj;
- i->suppress_bgerror = 0;
i->currentScriptObj = Jim_NewEmptyStringObj(i);
Jim_IncrRefCount(i->emptyObj);
Jim_IncrRefCount(i->result);
@@ -9877,41 +9876,6 @@ int Jim_EvalGlobal(Jim_Interp *interp, const char *script)
return retval;
}
-int Jim_EvalObjBackground(Jim_Interp *interp, Jim_Obj *scriptObjPtr)
-{
- Jim_CallFrame *savedFramePtr;
- int retval;
-
- savedFramePtr = interp->framePtr;
- interp->framePtr = interp->topFramePtr;
- retval = Jim_EvalObj(interp, scriptObjPtr);
- interp->framePtr = savedFramePtr;
- /* Try to report the error (if any) via the bgerror proc */
- if (retval != JIM_OK && !interp->suppress_bgerror) {
- Jim_Obj *objv[2];
- int rc = JIM_ERR;
-
- objv[0] = Jim_NewStringObj(interp, "bgerror", -1);
- objv[1] = Jim_GetResult(interp);
- Jim_IncrRefCount(objv[0]);
- Jim_IncrRefCount(objv[1]);
- if (Jim_GetCommand(interp, objv[0], JIM_NONE) == NULL || (rc = Jim_EvalObjVector(interp, 2, objv)) != JIM_OK) {
- if (rc == JIM_BREAK) {
- /* No more bgerror calls */
- interp->suppress_bgerror++;
- }
- else {
- /* Report the error to stderr. */
- fprintf(stderr, "Background error:" JIM_NL);
- Jim_PrintErrorMessage(interp);
- }
- }
- Jim_DecrRefCount(interp, objv[0]);
- Jim_DecrRefCount(interp, objv[1]);
- }
- return retval;
-}
-
#include <sys/stat.h>
int Jim_EvalFile(Jim_Interp *interp, const char *filename)