diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-04-08 15:18:55 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-04-08 15:18:55 +0000 |
commit | 02f742b45eb8792053d3880641f45651d645e351 (patch) | |
tree | 1d5893bcc89c8f879712aa80f9a98a42f397e2c0 /src/http/ngx_http_script.h | |
parent | 87ff72436d289ae7b72a23138262e6d156490927 (diff) | |
download | nginx-release-0.1.28.tar.gz nginx-release-0.1.28.zip |
nginx-0.1.28-RELEASE importrelease-0.1.28
*) Bugfix: nginx hogs CPU while proxying the huge files.
*) Bugfix: nginx could not be built by gcc 4.0 on Linux.
Diffstat (limited to 'src/http/ngx_http_script.h')
-rw-r--r-- | src/http/ngx_http_script.h | 56 |
1 files changed, 48 insertions, 8 deletions
diff --git a/src/http/ngx_http_script.h b/src/http/ngx_http_script.h index 658faaa9b..fae2b7bb1 100644 --- a/src/http/ngx_http_script.h +++ b/src/http/ngx_http_script.h @@ -13,14 +13,54 @@ #include <ngx_http.h> -typedef u_char *(*ngx_http_script_code_pt) (ngx_http_request_t *r, - u_char *buf, void *data); - -typedef struct ngx_http_script_code_s { - size_t data_len; - size_t code_len; - ngx_http_script_code_pt code; -} ngx_http_script_code_t; +typedef struct { + u_char *ip; + u_char *pos; + ngx_http_request_t *request; +} ngx_http_script_lite_engine_t; + + +typedef struct { + ngx_http_script_lite_engine_t lite; +} ngx_http_script_engine_t; + + +typedef void (*ngx_http_script_code_pt) (ngx_http_script_engine_t *e); +typedef size_t (*ngx_http_script_len_code_pt) + (ngx_http_script_lite_engine_t *e); + +typedef ngx_int_t (*ngx_http_script_compile_lite_start_pt) (ngx_table_elt_t *h, + ngx_array_t *lengths, ngx_array_t *values, ngx_uint_t value); +typedef ngx_int_t (*ngx_http_script_compile_lite_end_pt) (ngx_array_t *lengths, + ngx_array_t *values); + + +typedef struct { + ngx_http_script_code_pt code; + uintptr_t len; +} ngx_http_script_copy_code_t; + + +typedef struct { + ngx_http_script_code_pt code; + uintptr_t index; +} ngx_http_script_var_code_t; + + +ngx_int_t ngx_http_script_compile_lite(ngx_conf_t *cf, ngx_array_t *sources, + ngx_array_t **lengths, ngx_array_t **values, + ngx_http_script_compile_lite_start_pt start, + ngx_http_script_compile_lite_end_pt end); + + +static void *ngx_http_script_start_code(ngx_pool_t *pool, ngx_array_t **codes, + size_t size); + +size_t ngx_http_script_copy_len(ngx_http_script_engine_t *e); +void ngx_http_script_copy(ngx_http_script_engine_t *e); +size_t ngx_http_script_copy_var_len(ngx_http_script_engine_t *e); +void ngx_http_script_copy_var(ngx_http_script_engine_t *e); + #endif /* _NGX_HTTP_SCRIPT_H_INCLUDED_ */ |