From 44d731cebec9c95e3a5cfc1fe7b7aeafcb3fe3b4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 21 Apr 2009 11:14:46 -0700 Subject: http11: remove callbacks from structure There's no point in having redefinable callbacks if they're always going to be pointed to the same function. This reduces the size of the http_parser structure to half its original size. This change may actually make more sense in servers Mongrel/Thin than Unicorn since Unicorn only has one parser per-process while other servers can have hundreds or even thousands. --- ext/unicorn/http11/http11.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'ext/unicorn/http11/http11.c') diff --git a/ext/unicorn/http11/http11.c b/ext/unicorn/http11/http11.c index fbe2432..3b21d27 100644 --- a/ext/unicorn/http11/http11.c +++ b/ext/unicorn/http11/http11.c @@ -308,14 +308,6 @@ static VALUE HttpParser_alloc(VALUE klass) VALUE obj; http_parser *hp = ALLOC_N(http_parser, 1); TRACE(); - hp->http_field = http_field; - hp->request_method = request_method; - hp->request_uri = request_uri; - hp->fragment = fragment; - hp->request_path = request_path; - hp->query_string = query_string; - hp->http_version = http_version; - hp->header_done = header_done; http_parser_init(hp); obj = Data_Wrap_Struct(klass, NULL, HttpParser_free, hp); -- cgit v1.2.3-24-ge0c7