diff options
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r-- | ext/socket/rubysocket.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index 359d28ea3d..d03b1c5e0b 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -423,4 +423,12 @@ static inline void rsock_maybe_wait_fd(int fd) { } # define MSG_DONTWAIT_RELIABLE 0 #endif +static inline int +rsock_opt_false_p(VALUE opt, VALUE sym) +{ + if (!NIL_P(opt) && Qfalse == rb_hash_lookup2(opt, sym, Qundef)) + return 1; + return 0; +} + #endif |