* ext/tk/tcltklib.c: rbtk_eventloop_depth is used as int.
* ext/tk/tcltklib.c: rbtk_pending_exception is tested with NIL_P, so should assign Qnil instead of 0 (Qfalse). * ext/tk/tcltklib.c (ip_invoke_real): fixed memory leak when ip is deleted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4826eaecf6
commit
9042a601c8
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Tue Jul 19 14:10:50 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
|
* ext/tk/tcltklib.c: rbtk_eventloop_depth is used as int.
|
||||||
|
|
||||||
|
* ext/tk/tcltklib.c: rbtk_pending_exception is tested with
|
||||||
|
NIL_P, so should assign Qnil instead of 0 (Qfalse).
|
||||||
|
|
||||||
|
* ext/tk/tcltklib.c (ip_invoke_real): fixed memory leak when
|
||||||
|
ip is deleted.
|
||||||
|
|
||||||
Tue Jul 19 13:19:46 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
Tue Jul 19 13:19:46 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tk/lib/tk/variable.rb: For symmetry, add TkVariable#string. It
|
* ext/tk/lib/tk/variable.rb: For symmetry, add TkVariable#string. It
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Oct. 24, 1997 Y. Matsumoto
|
* Oct. 24, 1997 Y. Matsumoto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define TCLTKLIB_RELEASE_DATE "2005-07-13"
|
#define TCLTKLIB_RELEASE_DATE "2005-07-19"
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "rubysig.h"
|
#include "rubysig.h"
|
||||||
@ -550,7 +550,7 @@ rbtk_release_ip(ptr)
|
|||||||
|
|
||||||
/* treat excetiopn on Tcl side */
|
/* treat excetiopn on Tcl side */
|
||||||
static VALUE rbtk_pending_exception;
|
static VALUE rbtk_pending_exception;
|
||||||
static VALUE rbtk_eventloop_depth = 0;
|
static int rbtk_eventloop_depth = 0;
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -1110,7 +1110,7 @@ lib_eventloop_core(check_root, update_flag, check_var)
|
|||||||
if (!NIL_P(rbtk_pending_exception)) {
|
if (!NIL_P(rbtk_pending_exception)) {
|
||||||
if (rbtk_eventloop_depth == 0) {
|
if (rbtk_eventloop_depth == 0) {
|
||||||
VALUE exc = rbtk_pending_exception;
|
VALUE exc = rbtk_pending_exception;
|
||||||
rbtk_pending_exception = 0;
|
rbtk_pending_exception = Qnil;
|
||||||
rb_exc_raise(exc);
|
rb_exc_raise(exc);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@ -1226,7 +1226,7 @@ lib_eventloop_core(check_root, update_flag, check_var)
|
|||||||
if (!NIL_P(rbtk_pending_exception)) {
|
if (!NIL_P(rbtk_pending_exception)) {
|
||||||
if (rbtk_eventloop_depth == 0) {
|
if (rbtk_eventloop_depth == 0) {
|
||||||
VALUE exc = rbtk_pending_exception;
|
VALUE exc = rbtk_pending_exception;
|
||||||
rbtk_pending_exception = 0;
|
rbtk_pending_exception = Qnil;
|
||||||
rb_exc_raise(exc);
|
rb_exc_raise(exc);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@ -1298,7 +1298,7 @@ lib_eventloop_core(check_root, update_flag, check_var)
|
|||||||
if (!NIL_P(rbtk_pending_exception)) {
|
if (!NIL_P(rbtk_pending_exception)) {
|
||||||
if (rbtk_eventloop_depth == 0) {
|
if (rbtk_eventloop_depth == 0) {
|
||||||
VALUE exc = rbtk_pending_exception;
|
VALUE exc = rbtk_pending_exception;
|
||||||
rbtk_pending_exception = 0;
|
rbtk_pending_exception = Qnil;
|
||||||
rb_exc_raise(exc);
|
rb_exc_raise(exc);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@ -6846,9 +6846,6 @@ ip_invoke_real(argc, argv, interp)
|
|||||||
|
|
||||||
DUMP2("invoke_real called by thread:%lx", rb_thread_current());
|
DUMP2("invoke_real called by thread:%lx", rb_thread_current());
|
||||||
|
|
||||||
/* allocate memory for arguments */
|
|
||||||
av = alloc_invoke_arguments(argc, argv);
|
|
||||||
|
|
||||||
/* get the data struct */
|
/* get the data struct */
|
||||||
ptr = get_ip(interp);
|
ptr = get_ip(interp);
|
||||||
|
|
||||||
@ -6858,6 +6855,9 @@ ip_invoke_real(argc, argv, interp)
|
|||||||
return rb_tainted_str_new2("");
|
return rb_tainted_str_new2("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* allocate memory for arguments */
|
||||||
|
av = alloc_invoke_arguments(argc, argv);
|
||||||
|
|
||||||
/* Invoke the C procedure */
|
/* Invoke the C procedure */
|
||||||
Tcl_ResetResult(ptr->ip);
|
Tcl_ResetResult(ptr->ip);
|
||||||
v = ip_invoke_core(interp, argc, av);
|
v = ip_invoke_core(interp, argc, av);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user