chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
slight improvements to scriptinv, including scriptinv_invoke_fg
[chiark-tcl.git]
/
base
/
scriptinv.c
diff --git
a/base/scriptinv.c
b/base/scriptinv.c
index 3bc383d9c847cf2857573f0efc7bd8784ca3f7f8..6dd53755e79963f7877c652dab926552faffac27 100644
(file)
--- a/
base/scriptinv.c
+++ b/
base/scriptinv.c
@@
-34,7
+34,8
@@
int cht_scriptinv_set(ScriptToInvoke *si, Tcl_Interp *ip,
return 0;
}
return 0;
}
-void cht_scriptinv_invoke(ScriptToInvoke *si, int argc, Tcl_Obj *const *argv) {
+int cht_scriptinv_invoke_fg(ScriptToInvoke *si, int argc,
+ Tcl_Obj *const *argv) {
Tcl_Obj *invoke=0;
int i, rc;
Tcl_Obj *invoke=0;
int i, rc;
@@
-60,5
+61,10
@@
void cht_scriptinv_invoke(ScriptToInvoke *si, int argc, Tcl_Obj *const *argv) {
x_rc:
for (i=0; i<argc; i++) Tcl_DecrRefCount(argv[i]);
if (invoke) Tcl_DecrRefCount(invoke);
x_rc:
for (i=0; i<argc; i++) Tcl_DecrRefCount(argv[i]);
if (invoke) Tcl_DecrRefCount(invoke);
-
if (rc) Tcl_BackgroundError(si->ip)
;
+
return rc
;
}
}
+
+void cht_scriptinv_invoke(ScriptToInvoke *si, int argc, Tcl_Obj *const *argv) {
+ rc= cht_scriptinv_invoke_fg(si, argc, argv);
+ if (rc) Tcl_BackgroundError(si->ip);
+}