diff options
| author | Jo-Philipp Wich | 2022-02-07 08:59:26 +0000 |
|---|---|---|
| committer | Jo-Philipp Wich | 2022-02-07 08:59:26 +0000 |
| commit | 881fd3b671188945581c15feef3dbdd9b0af9102 (patch) | |
| tree | 421f1aff254dbab874a5086c5c755080382292c9 | |
| parent | 8b2868e20d6e9b5931a2153a0854228e8a62e0f0 (diff) | |
| download | uhttpd-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) { |