summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-23 11:04:00 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-23 11:04:00 +0000
commit5b1c4cde0a4a41ab6a03e46f1c6a544fa16ae26b (patch)
tree45a774798665cc58c9282a9dca72a9ec94952626 /ext
parenta9c673107b3e01aa60317e0d85168b72cb2d89e9 (diff)
* ext/tcltklib/tcltklib.c (ip_RubyExitCommand): exit with status code
via TclTkIp#_eval didn't work. [ruby-talk:139390] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/tcltklib/tcltklib.c7
1 files changed, 4 insertions, 3 deletions
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