summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/tcltklib/tcltklib.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index acd0940538..f1cfe69220 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Apr 23 19:45:59 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
+
+ * ext/tcltklib/tcltklib.c (ip_RubyExitCommand): exit with status code
+ via TclTkIp#_eval didn't work. [ruby-talk:139390]
+
Fri Apr 22 16:41:50 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* ext/tcltklib/tcltklib.c (ip_set_exc_message): fixed memory leak.
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index e93fc04cc9..f6d60deaf6 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -4,7 +4,7 @@
* Oct. 24, 1997 Y. Matsumoto
*/
-#define TCLTKLIB_RELEASE_DATE "2005-04-22"
+#define TCLTKLIB_RELEASE_DATE "2005-04-23"
#include "ruby.h"
#include "rubysig.h"
@@ -2860,16 +2860,17 @@ ip_RubyExitCommand(clientData, interp, argc, argv)
case 2:
#if TCL_MAJOR_VERSION >= 8
- if (!Tcl_GetIntFromObj(interp, argv[1], &state)) {
+ if (Tcl_GetIntFromObj(interp, argv[1], &state) == TCL_ERROR) {
return TCL_ERROR;
}
param = Tcl_GetString(argv[1]);
#else /* TCL_MAJOR_VERSION < 8 */
state = (int)strtol(argv[1], &endptr, 0);
- if (endptr) {
+ if (*endptr) {
Tcl_AppendResult(interp,
"expected integer but got \"",
argv[1], "\"", (char *)NULL);
+ return TCL_ERROR;
}
param = argv[1];
#endif