From 0b1ff5207609bb2939fe70e996aa7651eac86c46 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Mon, 28 Aug 2023 12:41:26 +0100 Subject: Rust/rusty: Make a bunch of functions take ctx as const The various uwr_get_ functions should take the context pointer as a const. Signed-off-by: Andrew Clayton --- src/rust/unit-wasm-sys/rusty.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rust/unit-wasm-sys/rusty.rs b/src/rust/unit-wasm-sys/rusty.rs index 981e24a..3f07a56 100644 --- a/src/rust/unit-wasm-sys/rusty.rs +++ b/src/rust/unit-wasm-sys/rusty.rs @@ -61,35 +61,35 @@ pub fn uwr_set_req_buf( unsafe { luw_set_req_buf(ctx, buf, flags) } } -pub fn uwr_get_http_path(ctx: *mut luw_ctx_t) -> &'static str { +pub fn uwr_get_http_path(ctx: *const luw_ctx_t) -> &'static str { C2S!(luw_get_http_path(ctx)) } -pub fn uwr_get_http_method(ctx: *mut luw_ctx_t) -> &'static str { +pub fn uwr_get_http_method(ctx: *const luw_ctx_t) -> &'static str { C2S!(luw_get_http_method(ctx)) } -pub fn uwr_get_http_version(ctx: *mut luw_ctx_t) -> &'static str { +pub fn uwr_get_http_version(ctx: *const luw_ctx_t) -> &'static str { C2S!(luw_get_http_version(ctx)) } -pub fn uwr_get_http_query(ctx: *mut luw_ctx_t) -> &'static str { +pub fn uwr_get_http_query(ctx: *const luw_ctx_t) -> &'static str { C2S!(luw_get_http_query(ctx)) } -pub fn uwr_get_http_remote(ctx: *mut luw_ctx_t) -> &'static str { +pub fn uwr_get_http_remote(ctx: *const luw_ctx_t) -> &'static str { C2S!(luw_get_http_remote(ctx)) } -pub fn uwr_get_http_local_addr(ctx: *mut luw_ctx_t) -> &'static str { +pub fn uwr_get_http_local_addr(ctx: *const luw_ctx_t) -> &'static str { C2S!(luw_get_http_local_addr(ctx)) } -pub fn uwr_get_http_local_port(ctx: *mut luw_ctx_t) -> &'static str { +pub fn uwr_get_http_local_port(ctx: *const luw_ctx_t) -> &'static str { C2S!(luw_get_http_local_port(ctx)) } -pub fn uwr_get_http_server_name(ctx: *mut luw_ctx_t) -> &'static str { +pub fn uwr_get_http_server_name(ctx: *const luw_ctx_t) -> &'static str { C2S!(luw_get_http_server_name(ctx)) } -- cgit