summaryrefslogtreecommitdiffhomepage
path: root/examples/execute-file.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-02-07 10:13:38 +0100
committerGitHub <noreply@github.com>2022-02-07 10:13:38 +0100
commit78cdd2691a24dcb62f8342eabecfa8eeb2f301c2 (patch)
treed2c3aed28eb7c043c73b84ea3af0837225ee02a5 /examples/execute-file.c
parent5bd764a35aeaf50b54957bfa94ba94198514baf0 (diff)
parent11adf0c4ea91e63ec523849c2846fd07bf4348f5 (diff)
Merge pull request #38 from jow-/function-memory-model
treewide: rework function memory model
Diffstat (limited to 'examples/execute-file.c')
-rw-r--r--examples/execute-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/execute-file.c b/examples/execute-file.c
index 12910e3..1895cda 100644
--- a/examples/execute-file.c
+++ b/examples/execute-file.c
@@ -49,13 +49,13 @@ int main(int argc, char **argv)
/* compile source buffer into function */
char *syntax_error = NULL;
- uc_function_t *progfunc = uc_compile(&config, src, &syntax_error);
+ uc_program_t *program = uc_compile(&config, src, &syntax_error);
/* release source buffer */
uc_source_put(src);
/* check if compilation failed */
- if (!progfunc) {
+ if (!program) {
fprintf(stderr, "Failed to compile program: %s\n", syntax_error);
return 1;
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
/* execute compiled program function */
uc_value_t *last_expression_result = NULL;
- int return_code = uc_vm_execute(&vm, progfunc, &last_expression_result);
+ int return_code = uc_vm_execute(&vm, program, &last_expression_result);
/* handle return status */
switch (return_code) {