summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-02-07 09:59:26 +0100
committerJo-Philipp Wich <jo@mein.io>2022-02-07 09:59:26 +0100
commit881fd3b671188945581c15feef3dbdd9b0af9102 (patch)
tree421f1aff254dbab874a5086c5c755080382292c9
parent8b2868e20d6e9b5931a2153a0854228e8a62e0f0 (diff)
downloaduhttpd2-881fd3b671188945581c15feef3dbdd9b0af9102.tar.gz
ucode: adjust to latest ucode api
The public libucode api has been revised to return and expect an uc_program_t pointer instead of a main function reference. The program (former main function) is also not implicitly released by uc_vm_execute() anymore. Adjust the ucode plugin accordingly to match the new requirements. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--ucode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ucode.c b/ucode.c
index f408576..69da3da 100644
--- a/ucode.c
+++ b/ucode.c
@@ -220,7 +220,7 @@ uh_ucode_state_init(struct ucode_prefix *ucode)
{
char *syntax_error = NULL;
uc_vm_t *vm = &ucode->ctx;
- uc_function_t *handler;
+ uc_program_t *handler;
uc_vm_status_t status;
uc_source_t *src;
uc_value_t *v;
@@ -275,6 +275,7 @@ uh_ucode_state_init(struct ucode_prefix *ucode)
status = uc_vm_execute(vm, handler, &v);
exitcode = (int)ucv_int64_get(v);
+ uc_program_put(handler);
ucv_put(v);
switch (status) {