From 5e8979ad38efdc4de3a69cc53aea33710d478406 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Jun 2010 21:43:14 +0000 Subject: http: cleanups for latest Rubinius Rubinius now supports rb_str_set_len() and sets -fPIC. We shouldn't check for rb_str_modify() since link-time detection is broken under Rubinius and even 1.8.6 has rb_str_modify(). --- ext/unicorn_http/ext_help.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'ext/unicorn_http/ext_help.h') diff --git a/ext/unicorn_http/ext_help.h b/ext/unicorn_http/ext_help.h index 888bd36..cc157cb 100644 --- a/ext/unicorn_http/ext_help.h +++ b/ext/unicorn_http/ext_help.h @@ -10,22 +10,18 @@ #ifndef RUBINIUS # define rb_str_update(x) do {} while (0) -# define rb_str_flush(x) do {} while (0) #endif /* !RUBINIUS */ #ifndef HAVE_RB_STR_SET_LEN # ifdef RUBINIUS -# define rb_str_set_len(str,len) rb_str_resize(str,len) -# else /* 1.8.6 optimized version */ +# 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'; - rb_str_flush(str); } -# define rb_str_set_len(str,len) rb_18_str_set_len(str,len) -# endif /* ! RUBINIUS */ #endif /* !defined(HAVE_RB_STR_SET_LEN) */ /* not all Ruby implementations support frozen objects (Rubinius does not) */ -- cgit v1.2.3-24-ge0c7