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>
{
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;
status = uc_vm_execute(vm, handler, &v);
exitcode = (int)ucv_int64_get(v);
+ uc_program_put(handler);
ucv_put(v);
switch (status) {