mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* NEWS: entry for ruby_vm_at_exit().
* eval.c (ruby_cleanup): bug fix around at_exit (1) timing was wrong. (2) execution order was opposite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2f1a781e85
commit
7911d42f1b
3 changed files with 17 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
|||
Thu Dec 2 23:52:26 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
|
||||
|
||||
* NEWS: entry for ruby_vm_at_exit().
|
||||
|
||||
* eval.c (ruby_cleanup): bug fix around at_exit (1) timing was
|
||||
wrong. (2) execution order was opposite.
|
||||
|
||||
Thu Dec 2 23:05:14 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/Makefile.sub (RCFLAGS): -nologo switch is only available in
|
||||
|
|
3
NEWS
3
NEWS
|
@ -19,6 +19,9 @@ with all sufficient information, see the ChangeLog file.
|
|||
* rb_scan_args() is enhanced with support for option hash argument
|
||||
extraction.
|
||||
|
||||
* ruby_vm_at_exit() added. This enables extension libs to hool a VM
|
||||
termination.
|
||||
|
||||
=== Library updates (outstanding ones only)
|
||||
|
||||
* builtin classes
|
||||
|
|
14
eval.c
14
eval.c
|
@ -151,13 +151,6 @@ ruby_cleanup(volatile int ex)
|
|||
}
|
||||
POP_TAG();
|
||||
|
||||
/* at_exit functions called here; any other place more apropriate
|
||||
* for this purpose? let me know if any. */
|
||||
for (i=0; i<RARRAY_LEN(ary); i++) {
|
||||
((void(*)(rb_vm_t*))RARRAY_PTR(ary)[i])(vm);
|
||||
}
|
||||
rb_ary_clear(ary);
|
||||
|
||||
errs[0] = th->errinfo;
|
||||
PUSH_TAG();
|
||||
if ((state = EXEC_TAG()) == 0) {
|
||||
|
@ -172,6 +165,13 @@ ruby_cleanup(volatile int ex)
|
|||
POP_TAG();
|
||||
rb_thread_stop_timer_thread();
|
||||
|
||||
/* at_exit functions called here; any other place more apropriate
|
||||
* for this purpose? let me know if any. */
|
||||
for (i=RARRAY_LEN(ary) - 1; i>=0; i--) {
|
||||
((void(*)(rb_vm_t*))RARRAY_PTR(ary)[i])(vm);
|
||||
}
|
||||
rb_ary_clear(ary);
|
||||
|
||||
#if EXIT_SUCCESS != 0 || EXIT_FAILURE != 1
|
||||
switch (ex) {
|
||||
#if EXIT_SUCCESS != 0
|
||||
|
|
Loading…
Reference in a new issue