Re: [tcljava-dev] PATCH: Jacl
Brought to you by:
mdejong
|
From: Mo D. <md...@un...> - 2003-03-13 22:33:00
|
On Sun, 4 Aug 2002 14:06:28 -0600
Tom Poindexter <tpo...@ny...> wrote:
...
> 8. TCL.java: change scope of OK to public, for use by Swank.
I still don't get why folks keep asking for this change. The TCL.OK
value should not be needed outside the Jacl package.
...
So, after a bit of poking around it seems that Shell.java should not
even be calling updateReturnInfo() or checking to see if the value
is TCL.OK since this is already taken care of in interp.eval(). I just
checked the following into the CVS, it removes the refs to TCL.OK.
Other shells that do the same, like Swank should make this
change too.
2003-03-13 Mo DeJong <md...@us...>
* extras/GuiShell/GuiShell.java (processCommand):
Remove call to interp.updateReturnInfo() and
check for TCL.OK. This is already handled by
the interp.eval() method.
* src/jacl/tcl/lang/Shell.java (processEvent):
Remove call to interp.updateReturnInfo() and
check for TCL.OK. This is already handled by
the interp.eval() method.
Index: extras/GuiShell/GuiShell.java
===================================================================
RCS file: /cvsroot/tcljava/tcljava/extras/GuiShell/GuiShell.java,v
retrieving revision 1.1
diff -u -r1.1 GuiShell.java
--- extras/GuiShell/GuiShell.java 8 May 1999 05:19:00 -0000 1.1
+++ extras/GuiShell/GuiShell.java 13 Mar 2003 22:26:05 -0000
@@ -225,16 +225,7 @@
} else {
TclException e = evt.evalException;
int code = e.getCompletionCode();
-
- check_code: {
- if (code == TCL.RETURN) {
- code = interp.updateReturnInfo();
- if (code == TCL.OK) {
- break check_code;
- }
- }
-
- switch (code) {
+ switch (code) {
case TCL.ERROR:
append(interp.getResult().toString());
append("\n");
@@ -247,7 +238,6 @@
break;
default:
append("command returned bad code: " + code + "\n");
- }
}
}
Index: src/jacl/tcl/lang/Shell.java
===================================================================
RCS file: /cvsroot/tcljava/tcljava/src/jacl/tcl/lang/Shell.java,v
retrieving revision 1.12
diff -u -r1.12 Shell.java
--- src/jacl/tcl/lang/Shell.java 8 Mar 2003 03:42:44 -0000 1.12
+++ src/jacl/tcl/lang/Shell.java 13 Mar 2003 22:26:07 -0000
@@ -322,16 +322,7 @@
}
int code = e.getCompletionCode();
-
- check_code: {
- if (code == TCL.RETURN) {
- code = interp.updateReturnInfo();
- if (code == TCL.OK) { // FIXME : TCL.OK not accessable outside!!
- break check_code;
- }
- }
-
- switch (code) {
+ switch (code) {
case TCL.ERROR:
// This really sucks. The getMessage() call on
// a TclException will not always return a msg.
@@ -346,7 +337,6 @@
break;
default:
putLine(err, "command returned bad code: " + code);
- }
}
} finally {
commandObj.release();
|