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
4683b89b
Commit
4683b89b
authored
Jan 01, 2016
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3068 from kazuho/kazuho/osx-_setjmp
use _setjmp/_longjmp on OS X
parents
38b9c2d3
121c6e30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
include/mruby/throw.h
include/mruby/throw.h
+10
-2
No files found.
include/mruby/throw.h
View file @
4683b89b
...
...
@@ -20,11 +20,19 @@ typedef mrb_int mrb_jmpbuf_impl;
#include <setjmp.h>
#define MRB_TRY(buf) do { if (setjmp((buf)->impl) == 0) {
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#define MRB_SETJMP _setjmp
#define MRB_LONGJMP _longjmp
#else
#define MRB_SETJMP setjmp
#define MRB_LONGJMP longjmp
#endif
#define MRB_TRY(buf) do { if (MRB_SETJMP((buf)->impl) == 0) {
#define MRB_CATCH(buf) } else {
#define MRB_END_EXC(buf) } } while(0)
#define MRB_THROW(buf)
longjmp
((buf)->impl, 1);
#define MRB_THROW(buf)
MRB_LONGJMP
((buf)->impl, 1);
#define mrb_jmpbuf_impl jmp_buf
#endif
...
...
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