ry / ebb fork watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
* change all functions in src/ebb_ruby.c to static

static functions avoid conflicts and (in theory) could be better optimized
Radarek (author)
Thu Jul 03 10:39:54 -0700 2008
commit  ab9f8b96d06387de12f0929872d551b2a5c162f0
tree    f38b06ef303bc667f68b19b102812125a344367f
parent  4e3e4f5956e572fc2c5551fae8bc7057dda31744
...
58
59
60
61
 
62
63
64
...
71
72
73
74
 
75
76
77
78
79
80
81
 
82
83
84
85
86
87
88
 
89
90
91
...
132
133
134
135
 
136
137
138
...
141
142
143
144
 
145
146
147
148
149
150
 
151
152
153
154
155
 
156
157
158
159
160
 
161
162
163
...
188
189
190
191
 
192
193
194
...
197
198
199
200
 
201
202
203
...
220
221
222
223
 
224
225
226
...
228
229
230
231
 
232
233
234
...
236
237
238
239
 
240
241
242
...
245
246
247
248
 
249
250
251
...
58
59
60
 
61
62
63
64
...
71
72
73
 
74
75
76
77
78
79
80
 
81
82
83
84
85
86
87
 
88
89
90
91
...
132
133
134
 
135
136
137
138
...
141
142
143
 
144
145
146
147
148
149
 
150
151
152
153
154
 
155
156
157
158
159
 
160
161
162
163
...
188
189
190
 
191
192
193
194
...
197
198
199
 
200
201
202
203
...
220
221
222
 
223
224
225
226
...
228
229
230
 
231
232
233
234
...
236
237
238
 
239
240
241
242
...
245
246
247
 
248
249
250
251
0
@@ -58,7 +58,7 @@ static void detach_idle_watcher()
0
 }
0
 
0
 
0
-void request_cb(ebb_client *client, void *data)
0
+static void request_cb(ebb_client *client, void *data)
0
 {
0
   VALUE rb_client = Data_Wrap_Struct(cClient, 0, 0, client);
0
   
0
@@ -71,21 +71,21 @@ void request_cb(ebb_client *client, void *data)
0
   attach_idle_watcher();
0
 }
0
 
0
-VALUE server_listen_on_fd(VALUE _, VALUE sfd)
0
+static VALUE server_listen_on_fd(VALUE _, VALUE sfd)
0
 {
0
   if(ebb_server_listen_on_fd(server, FIX2INT(sfd)) < 0)
0
     rb_sys_fail("Problem listening on FD");
0
   return Qnil;
0
 }
0
 
0
-VALUE server_listen_on_port(VALUE _, VALUE port)
0
+static VALUE server_listen_on_port(VALUE _, VALUE port)
0
 {
0
   if(ebb_server_listen_on_port(server, FIX2INT(port)) < 0)
0
     rb_sys_fail("Problem listening on port");
0
   return Qnil;
0
 }
0
 
0
-VALUE server_listen_on_unix_socket(VALUE _, VALUE socketfile)
0
+static VALUE server_listen_on_unix_socket(VALUE _, VALUE socketfile)
0
 {
0
   if(ebb_server_listen_on_unix_socket(server, StringValuePtr(socketfile)) < 0)
0
     rb_sys_fail("Problem listening on unix socket");
0
@@ -132,7 +132,7 @@ idle_cb (struct ev_loop *loop, struct ev_idle *w, int revents) {
0
   }
0
 }
0
 
0
-VALUE server_process_connections(VALUE _)
0
+static VALUE server_process_connections(VALUE _)
0
 {
0
   TRAP_BEG;
0
   ev_loop(loop, EVLOOP_ONESHOT);
0
@@ -141,23 +141,23 @@ VALUE server_process_connections(VALUE _)
0
 }
0
 
0
 
0
-VALUE server_unlisten(VALUE _)
0
+static VALUE server_unlisten(VALUE _)
0
 {
0
   ebb_server_unlisten(server);
0
   return Qnil;
0
 }
0
 
0
-VALUE server_open(VALUE _)
0
+static VALUE server_open(VALUE _)
0
 {
0
   return server->open ? Qtrue : Qfalse;
0
 }
0
 
0
-VALUE server_waiting_clients(VALUE _)
0
+static VALUE server_waiting_clients(VALUE _)
0
 {
0
   return waiting_clients;
0
 }
0
 
0
-VALUE env_field(struct ebb_env_item *item)
0
+static VALUE env_field(struct ebb_env_item *item)
0
 {
0
   if(item->field) {
0
     VALUE f = rb_str_new(NULL, RSTRING_LEN(global_http_prefix) + item->field_length);
0
@@ -188,7 +188,7 @@ VALUE env_field(struct ebb_env_item *item)
0
 }
0
 
0
 
0
-VALUE env_value(struct ebb_env_item *item)
0
+static VALUE env_value(struct ebb_env_item *item)
0
 {
0
   if(item->value_length > 0)
0
     return rb_str_new(item->value, item->value_length);
0
@@ -197,7 +197,7 @@ VALUE env_value(struct ebb_env_item *item)
0
 }
0
 
0
 
0
-VALUE client_env(VALUE _, VALUE rb_client)
0
+static VALUE client_env(VALUE _, VALUE rb_client)
0
 {
0
   ebb_client *client;
0
   VALUE field, value, env = rb_hash_new();
0
@@ -220,7 +220,7 @@ VALUE client_env(VALUE _, VALUE rb_client)
0
   return env;
0
 }
0
 
0
-VALUE client_write_status(VALUE _, VALUE client, VALUE status, VALUE reason_phrase)
0
+static VALUE client_write_status(VALUE _, VALUE client, VALUE status, VALUE reason_phrase)
0
 {
0
   ebb_client *_client;
0
   Data_Get_Struct(client, ebb_client, _client);
0
@@ -228,7 +228,7 @@ VALUE client_write_status(VALUE _, VALUE client, VALUE status, VALUE reason_phra
0
   return Qnil;
0
 }
0
 
0
-VALUE client_write_header(VALUE _, VALUE client, VALUE field, VALUE value)
0
+static VALUE client_write_header(VALUE _, VALUE client, VALUE field, VALUE value)
0
 {
0
   ebb_client *_client;
0
   Data_Get_Struct(client, ebb_client, _client);
0
@@ -236,7 +236,7 @@ VALUE client_write_header(VALUE _, VALUE client, VALUE field, VALUE value)
0
   return Qnil;
0
 }
0
 
0
-VALUE client_write_body(VALUE _, VALUE client, VALUE string)
0
+static VALUE client_write_body(VALUE _, VALUE client, VALUE string)
0
 {
0
   ebb_client *_client;
0
   Data_Get_Struct(client, ebb_client, _client);
0
@@ -245,7 +245,7 @@ VALUE client_write_body(VALUE _, VALUE client, VALUE string)
0
 }
0
 
0
 
0
-VALUE client_release(VALUE _, VALUE rb_client)
0
+static VALUE client_release(VALUE _, VALUE rb_client)
0
 {
0
   ebb_client *client;
0
   Data_Get_Struct(rb_client, ebb_client, client);

Comments

    No one has commented yet.