4343 int32_t p3 = args[2].of.i32; \
4444 int32_t res = NAME(p1, p2, p3);
4545
46+ #define DEFINE_WASM_API_ARG_I32_I32_I32_I32 \
47+ int32_t, int32_t, int32_t, int32_t
48+
49+ #define DEFINE_WASM_API_ARG_CHECK_I32_I32_I32_I32 (NAME ) \
50+ int32_t p1 = args[0].of.i32; \
51+ int32_t p2 = args[1].of.i32; \
52+ int32_t p3 = args[2].of.i32; \
53+ int32_t p4 = args[3].of.i32; \
54+ int32_t res = NAME(p1, p2, p3, p4);
55+
4656#define DEFINE_WASM_API_ARG_I32_I32_I32_I32_I32 \
4757 int32_t, int32_t, int32_t, int32_t, int32_t
4858
7888 1, {WASM_I32}
7989#define DEFINE_WASM_NAME_ARG_I32_I32_I32 \
8090 3, {WASM_I32, WASM_I32, WASM_I32}
91+ #define DEFINE_WASM_NAME_ARG_I32_I32_I32_I32 \
92+ 4, {WASM_I32, WASM_I32, WASM_I32, WASM_I32}
8193#define DEFINE_WASM_NAME_ARG_I32_I32_I32_I32_I32 \
8294 5, {WASM_I32, WASM_I32, WASM_I32, WASM_I32, WASM_I32}
8395#define DEFINE_WASM_NAME_ARG_I32_I32_I32_I32_I32_I32_I32_I32 \
@@ -98,6 +110,9 @@ DEFINE_WASM_API(proxy_set_effective_context,
98110DEFINE_WASM_API (proxy_log ,
99111 DEFINE_WASM_API_ARG_I32_I32_I32 ,
100112 DEFINE_WASM_API_ARG_CHECK_I32_I32_I32 (proxy_log ))
113+ DEFINE_WASM_API (proxy_get_property ,
114+ DEFINE_WASM_API_ARG_I32_I32_I32_I32 ,
115+ DEFINE_WASM_API_ARG_CHECK_I32_I32_I32_I32 (proxy_get_property ))
101116DEFINE_WASM_API (proxy_get_buffer_bytes ,
102117 DEFINE_WASM_API_ARG_I32_I32_I32_I32_I32 ,
103118 DEFINE_WASM_API_ARG_CHECK_I32_I32_I32_I32_I32 (proxy_get_buffer_bytes ))
@@ -110,6 +125,7 @@ DEFINE_WASM_API(proxy_send_http_response,
110125static ngx_wasm_host_api_t host_apis [] = {
111126 DEFINE_WASM_NAME (proxy_set_effective_context , DEFINE_WASM_NAME_ARG_I32 )
112127 DEFINE_WASM_NAME (proxy_log , DEFINE_WASM_NAME_ARG_I32_I32_I32 )
128+ DEFINE_WASM_NAME (proxy_get_property , DEFINE_WASM_NAME_ARG_I32_I32_I32_I32 )
113129 DEFINE_WASM_NAME (proxy_get_buffer_bytes , DEFINE_WASM_NAME_ARG_I32_I32_I32_I32_I32 )
114130 DEFINE_WASM_NAME_ALIAS (proxy_send_http_response ,
115131 DEFINE_WASM_NAME_ARG_I32_I32_I32_I32_I32_I32_I32_I32 ,
0 commit comments