diff options
Diffstat (limited to 'ext/unicorn_http/ext_help.h')
-rw-r--r-- | ext/unicorn_http/ext_help.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/ext/unicorn_http/ext_help.h b/ext/unicorn_http/ext_help.h index c87c272..747c36c 100644 --- a/ext/unicorn_http/ext_help.h +++ b/ext/unicorn_http/ext_help.h @@ -1,26 +1,6 @@ #ifndef ext_help_h #define ext_help_h -#ifndef RSTRING_PTR -#define RSTRING_PTR(s) (RSTRING(s)->ptr) -#endif /* !defined(RSTRING_PTR) */ -#ifndef RSTRING_LEN -#define RSTRING_LEN(s) (RSTRING(s)->len) -#endif /* !defined(RSTRING_LEN) */ - -#ifndef HAVE_RB_STR_SET_LEN -# ifdef RUBINIUS -# error we should never get here with current Rubinius (1.x) -# endif -/* this is taken from Ruby 1.8.7, 1.8.6 may not have it */ -static void rb_18_str_set_len(VALUE str, long len) -{ - RSTRING(str)->len = len; - RSTRING(str)->ptr[len] = '\0'; -} -# define rb_str_set_len(str,len) rb_18_str_set_len(str,len) -#endif /* !defined(HAVE_RB_STR_SET_LEN) */ - /* not all Ruby implementations support frozen objects (Rubinius does not) */ #if defined(OBJ_FROZEN) # define assert_frozen(f) assert(OBJ_FROZEN(f) && "unfrozen object") |