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 */
13 # define RSTRING_PTR(s) (RSTRING(s)->ptr)
14 #endif /* !defined(RSTRING_PTR) */
16 # define RSTRING_LEN(s) (RSTRING(s)->len)
17 #endif /* !defined(RSTRING_LEN) */
19 #endif /* MISSING_ANCIENT_RUBY_H */