зеркало из https://github.com/github/ruby.git
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
740a664bc8
Коммит
82178a5529
|
@ -1,3 +1,11 @@
|
|||
Tue Aug 15 17:30:59 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (frame_dup): should set flag FRAME_MALLOC after
|
||||
argv allocation.
|
||||
|
||||
* eval.c (blk_free): should not free argv if GC was called before
|
||||
frame_dup.
|
||||
|
||||
Tue Aug 15 16:08:40 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
||||
|
||||
* configure.in: add ac_cv_func_times=yes for mingw32.
|
||||
|
|
4
env.h
4
env.h
|
@ -25,10 +25,14 @@ extern struct FRAME {
|
|||
char *file;
|
||||
int line;
|
||||
int iter;
|
||||
int flags;
|
||||
} *ruby_frame;
|
||||
|
||||
void rb_gc_mark_frame _((struct FRAME *));
|
||||
|
||||
#define FRAME_ALLOCA 0
|
||||
#define FRAME_MALLOC 1
|
||||
|
||||
extern struct SCOPE {
|
||||
struct RBasic super;
|
||||
ID *local_tbl;
|
||||
|
|
6
eval.c
6
eval.c
|
@ -505,6 +505,7 @@ static struct SCOPE *top_scope;
|
|||
_frame.cbase = ruby_frame->cbase; \
|
||||
_frame.argc = 0; \
|
||||
_frame.argv = 0; \
|
||||
_frame.flags = FRAME_ALLOCA; \
|
||||
ruby_frame = &_frame; \
|
||||
|
||||
#define POP_FRAME() \
|
||||
|
@ -5682,7 +5683,7 @@ blk_free(data)
|
|||
|
||||
frame = data->frame.prev;
|
||||
while (frame) {
|
||||
if (frame->argc > 0)
|
||||
if (frame->argc > 0 && (frame->flags & FRAME_MALLOC))
|
||||
free(frame->argv);
|
||||
tmp = frame;
|
||||
frame = frame->prev;
|
||||
|
@ -5728,6 +5729,7 @@ frame_dup(frame)
|
|||
argv = ALLOC_N(VALUE, frame->argc);
|
||||
MEMCPY(argv, frame->argv, VALUE, frame->argc);
|
||||
frame->argv = argv;
|
||||
frame->flags = FRAME_MALLOC;
|
||||
}
|
||||
frame->tmp = 0; /* should not preserve tmp */
|
||||
if (!frame->prev) break;
|
||||
|
@ -7781,7 +7783,7 @@ rb_thread_status(thread)
|
|||
rb_thread_t th = rb_thread_check(thread);
|
||||
|
||||
if (rb_thread_dead(th)) {
|
||||
if (NIL_P(th->errinfo) && (th->flags & THREAD_RAISED))
|
||||
if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED))
|
||||
return Qnil;
|
||||
return Qfalse;
|
||||
}
|
||||
|
|
|
@ -216,6 +216,7 @@ module Net
|
|||
raise FTPReplyError, resp
|
||||
end
|
||||
conn = sock.accept
|
||||
sock.close
|
||||
end
|
||||
return conn
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче