From 8dce3b870b923db810d232e408c530f938f75d80 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Mon, 28 Aug 2023 12:37:01 +0100 Subject: libunit-wasm: Pass ctx into luw_http_hdr_get_value() as const Technically the context pointer can be passed in const even though we then un-const it passing it to the luw_foreach_http_hdr() macro. Signed-off-by: Andrew Clayton --- src/rust/unit-wasm-sys/rusty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rust') diff --git a/src/rust/unit-wasm-sys/rusty.rs b/src/rust/unit-wasm-sys/rusty.rs index fbfecd3..981e24a 100644 --- a/src/rust/unit-wasm-sys/rusty.rs +++ b/src/rust/unit-wasm-sys/rusty.rs @@ -124,7 +124,7 @@ pub fn uwr_http_hdr_iter( unsafe { luw_http_hdr_iter(ctx, luw_http_hdr_iter_func, user_data) } } -pub fn uwr_http_hdr_get_value(ctx: *mut luw_ctx_t, hdr: &str) -> &'static str { +pub fn uwr_http_hdr_get_value(ctx: *const luw_ctx_t, hdr: &str) -> &'static str { C2S!(luw_http_hdr_get_value(ctx, S2C!(hdr).as_ptr() as *const i8)) } -- cgit