From 13e3a7fc441cba42e2890af6f8bac573f43867a5 Mon Sep 17 00:00:00 2001 From: wayneeseguin Date: Sun, 19 Aug 2007 16:12:11 +0000 Subject: Switched to C-Style comments in http11.c so that it will now compile in Solaris 2.9. [#11728] git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@570 19e92222-5c0b-0410-8929-a290d50e31e9 --- ext/http11/http11.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'ext') diff --git a/ext/http11/http11.c b/ext/http11/http11.c index 8a056f1..a201e0e 100644 --- a/ext/http11/http11.c +++ b/ext/http11/http11.c @@ -157,7 +157,7 @@ void header_done(void *data, const char *at, size_t length) rb_hash_aset(req, global_gateway_interface, global_gateway_interface_value); if((temp = rb_hash_aref(req, global_http_host)) != Qnil) { - // ruby better close strings off with a '\0' dammit + /* ruby better close strings off with a '\0' dammit */ colon = strchr(RSTRING(temp)->ptr, ':'); if(colon != NULL) { rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr)); @@ -170,7 +170,7 @@ void header_done(void *data, const char *at, size_t length) } } - // grab the initial body and stuff it into an ivar + /* grab the initial body and stuff it into an ivar */ rb_ivar_set(req, id_http_body, rb_str_new(at, length)); rb_hash_aset(req, global_server_protocol, global_server_protocol_value); rb_hash_aset(req, global_server_software, global_mongrel_version); @@ -392,7 +392,7 @@ VALUE URIClassifier_init(VALUE self) { VALUE hash; - // we create an internal hash to protect stuff from the GC + /* we create an internal hash to protect stuff from the GC */ hash = rb_hash_new(); rb_ivar_set(self, id_handler_map, hash); @@ -508,23 +508,23 @@ VALUE URIClassifier_resolve(VALUE self, VALUE uri) handler = tst_search(uri_str, tst, &pref_len); - // setup for multiple return values + /* setup for multiple return values */ result = rb_ary_new(); if(handler) { rb_ary_push(result, rb_str_substr (uri, 0, pref_len)); - // compensate for a script_name="/" where we need to add the "/" to path_info to keep it consistent + /* compensate for a script_name="/" where we need to add the "/" to path_info to keep it consistent */ if(pref_len == 1 && uri_str[0] == '/') { - // matches the root URI so we have to use the whole URI as the path_info + /* matches the root URI so we have to use the whole URI as the path_info */ rb_ary_push(result, uri); } else { - // matches a script so process like normal + /* matches a script so process like normal */ rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)->len)); } rb_ary_push(result, (VALUE)handler); } else { - // not found so push back nothing + /* not found so push back nothing */ rb_ary_push(result, Qnil); rb_ary_push(result, Qnil); rb_ary_push(result, Qnil); @@ -579,5 +579,3 @@ void Init_http11() rb_define_method(cURIClassifier, "unregister", URIClassifier_unregister, 1); rb_define_method(cURIClassifier, "resolve", URIClassifier_resolve, 1); } - - -- cgit v1.2.3-24-ge0c7