make timed kgio_wait_* implementation safer
[kgio.git] / ext / kgio / ancient_ruby.h
blob014e4b8b9104b5b8d945ef645b89eca7fd0dfa7f
1 #ifndef MISSING_ANCIENT_RUBY_H
2 #define MISSING_ANCIENT_RUBY_H
4 #ifndef HAVE_RB_STR_SET_LEN
5 static void rb_str_set_len(VALUE str, long len)
7 RSTRING(str)->len = len;
8 RSTRING(str)->ptr[len] = '\0';
10 #endif /* ! HAVE_RB_STR_SET_LEN */
12 #ifndef RSTRING_PTR
13 # define RSTRING_PTR(s) (RSTRING(s)->ptr)
14 #endif /* !defined(RSTRING_PTR) */
15 #ifndef RSTRING_LEN
16 # define RSTRING_LEN(s) (RSTRING(s)->len)
17 #endif /* !defined(RSTRING_LEN) */
19 #endif /* MISSING_ANCIENT_RUBY_H */