Guest User

Untitled

a guest
Jun 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. diff --git a/ext/em.h b/ext/em.h
  2. index 008fa7d..82397bc 100644
  3. --- a/ext/em.h
  4. +++ b/ext/em.h
  5. @@ -37,8 +37,13 @@ See the file COPYING for complete licensing information.
  6. #ifdef HAVE_RBTRAP
  7. #include <rubysig.h>
  8. #else
  9. - #define TRAP_BEG
  10. - #define TRAP_END
  11. + extern "C" {
  12. + void rb_enable_interrupt(void);
  13. + void rb_disable_interrupt(void);
  14. + }
  15. +
  16. + #define TRAP_BEG rb_enable_interrupt()
  17. + #define TRAP_END do { rb_disable_interrupt(); rb_thread_check_ints(); } while(0)
  18. #endif
  19.  
  20. // 1.9.0 compat
Add Comment
Please, Sign In to add comment