1 #ifndef MISSING_ANCIENT_RUBY_H
2 #define MISSING_ANCIENT_RUBY_H
4 #ifndef HAVE_RB_STR_SET_LEN
5 static void my_str_set_len(VALUE str
, long len
)
7 RSTRING(str
)->len
= len
;
8 RSTRING(str
)->ptr
[len
] = '\0';
10 #define rb_str_set_len(str,len) my_str_set_len((str),(len))
11 #endif /* ! HAVE_RB_STR_SET_LEN */
14 # define RSTRING_PTR(s) (RSTRING(s)->ptr)
15 #endif /* !defined(RSTRING_PTR) */
17 # define RSTRING_LEN(s) (RSTRING(s)->len)
18 #endif /* !defined(RSTRING_LEN) */
21 # define RARRAY_LEN(s) (RARRAY(s)->len)
22 #endif /* !defined(RARRAY_LEN) */
24 #endif /* MISSING_ANCIENT_RUBY_H */