From 4c48b520786807487f7f76d709b0dbcee63c4d0c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 7 Oct 2010 06:59:05 +0000 Subject: http: remove unnecessary rb_str_update() calls Rubinius no longer uses it, and it conflicts with a public method in MRI. --- ext/unicorn_http/ext_help.h | 4 ---- ext/unicorn_http/unicorn_http.rl | 3 --- 2 files changed, 7 deletions(-) diff --git a/ext/unicorn_http/ext_help.h b/ext/unicorn_http/ext_help.h index 3aa24a8..1f76f54 100644 --- a/ext/unicorn_http/ext_help.h +++ b/ext/unicorn_http/ext_help.h @@ -8,10 +8,6 @@ #define RSTRING_LEN(s) (RSTRING(s)->len) #endif /* !defined(RSTRING_LEN) */ -#ifndef RUBINIUS -# define rb_str_update(x) do {} while (0) -#endif /* !RUBINIUS */ - #ifndef HAVE_RB_STR_SET_LEN # ifdef RUBINIUS # error we should never get here with current Rubinius (1.x) diff --git a/ext/unicorn_http/unicorn_http.rl b/ext/unicorn_http/unicorn_http.rl index 434335f..1e81c34 100644 --- a/ext/unicorn_http/unicorn_http.rl +++ b/ext/unicorn_http/unicorn_http.rl @@ -553,8 +553,6 @@ static VALUE HttpParser_parse(VALUE self) struct http_parser *hp = data_get(self); VALUE data = hp->buf; - rb_str_update(data); - http_parser_execute(hp, RSTRING_PTR(data), RSTRING_LEN(data)); VALIDATE_MAX_LENGTH(hp->offset, HEADER); @@ -678,7 +676,6 @@ static VALUE HttpParser_filter_body(VALUE self, VALUE buf, VALUE data) char *dptr; long dlen; - rb_str_update(data); dptr = RSTRING_PTR(data); dlen = RSTRING_LEN(data); -- cgit v1.2.3-24-ge0c7