Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_script.h @ 56:3050baa54a26 NGINX_0_1_28
nginx 0.1.28
*) Bugfix: nginx hogs CPU while proxying the huge files.
*) Bugfix: nginx could not be built by gcc 4.0 on Linux.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 08 Apr 2005 00:00:00 +0400 |
parents | |
children | b55cbf18157e |
comparison
equal
deleted
inserted
replaced
55:729de7d75018 | 56:3050baa54a26 |
---|---|
1 | |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_HTTP_SCRIPT_H_INCLUDED_ | |
8 #define _NGX_HTTP_SCRIPT_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 #include <ngx_http.h> | |
14 | |
15 | |
16 typedef struct { | |
17 u_char *ip; | |
18 u_char *pos; | |
19 ngx_http_request_t *request; | |
20 } ngx_http_script_lite_engine_t; | |
21 | |
22 | |
23 typedef struct { | |
24 ngx_http_script_lite_engine_t lite; | |
25 } ngx_http_script_engine_t; | |
26 | |
27 | |
28 typedef void (*ngx_http_script_code_pt) (ngx_http_script_engine_t *e); | |
29 typedef size_t (*ngx_http_script_len_code_pt) | |
30 (ngx_http_script_lite_engine_t *e); | |
31 | |
32 typedef ngx_int_t (*ngx_http_script_compile_lite_start_pt) (ngx_table_elt_t *h, | |
33 ngx_array_t *lengths, ngx_array_t *values, ngx_uint_t value); | |
34 typedef ngx_int_t (*ngx_http_script_compile_lite_end_pt) (ngx_array_t *lengths, | |
35 ngx_array_t *values); | |
36 | |
37 | |
38 typedef struct { | |
39 ngx_http_script_code_pt code; | |
40 uintptr_t len; | |
41 } ngx_http_script_copy_code_t; | |
42 | |
43 | |
44 typedef struct { | |
45 ngx_http_script_code_pt code; | |
46 uintptr_t index; | |
47 } ngx_http_script_var_code_t; | |
48 | |
49 | |
50 ngx_int_t ngx_http_script_compile_lite(ngx_conf_t *cf, ngx_array_t *sources, | |
51 ngx_array_t **lengths, ngx_array_t **values, | |
52 ngx_http_script_compile_lite_start_pt start, | |
53 ngx_http_script_compile_lite_end_pt end); | |
54 | |
55 | |
56 static void *ngx_http_script_start_code(ngx_pool_t *pool, ngx_array_t **codes, | |
57 size_t size); | |
58 | |
59 size_t ngx_http_script_copy_len(ngx_http_script_engine_t *e); | |
60 void ngx_http_script_copy(ngx_http_script_engine_t *e); | |
61 size_t ngx_http_script_copy_var_len(ngx_http_script_engine_t *e); | |
62 void ngx_http_script_copy_var(ngx_http_script_engine_t *e); | |
63 | |
64 | |
65 | |
66 #endif /* _NGX_HTTP_SCRIPT_H_INCLUDED_ */ |