Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
6cc52b32
Unverified
Commit
6cc52b32
authored
Feb 02, 2021
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore errors from `atexit` finalizers.
parent
d759a735
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
src/state.c
src/state.c
+11
-3
No files found.
src/state.c
View file @
6cc52b32
...
...
@@ -12,6 +12,7 @@
#include <mruby/debug.h>
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/throw.h>
void
mrb_init_core
(
mrb_state
*
);
void
mrb_init_mrbgems
(
mrb_state
*
);
...
...
@@ -181,9 +182,16 @@ mrb_close(mrb_state *mrb)
{
if
(
!
mrb
)
return
;
if
(
mrb
->
atexit_stack_len
>
0
)
{
mrb_int
i
;
for
(
i
=
mrb
->
atexit_stack_len
;
i
>
0
;
--
i
)
{
mrb
->
atexit_stack
[
i
-
1
](
mrb
);
struct
mrb_jmpbuf
*
prev_jmp
=
mrb
->
jmp
;
struct
mrb_jmpbuf
c_jmp
;
for
(
int
i
=
mrb
->
atexit_stack_len
;
i
>
0
;
--
i
)
{
MRB_TRY
(
&
c_jmp
)
{
mrb
->
jmp
=
&
c_jmp
;
mrb
->
atexit_stack
[
i
-
1
](
mrb
);
mrb
->
jmp
=
prev_jmp
;
}
MRB_CATCH
(
&
c_jmp
)
{
/* ignore atexit errors */
}
MRB_END_EXC
(
&
c_jmp
);
}
#ifndef MRB_FIXED_STATE_ATEXIT_STACK
mrb_free
(
mrb
,
mrb
->
atexit_stack
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment