Skip to content

Commit

Permalink
chore: use namespaced ExtismValType names
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed May 20, 2024
1 parent db6555d commit 13e5908
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions c/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ lean_obj_res l_extism_current_get_param_i64(b_lean_obj_arg current,
lean_obj_res l_extism_current_set_result_i64(b_lean_obj_arg current, uint64_t i,
uint64_t x) {
Current *c = current_plugin_unbox(current);
c->results[i].t = I64;
c->results[i].t = ExtismValType_I64;
c->results[i].v.i64 = x;
return lean_io_result_mk_ok(lean_box(0));
}
Expand All @@ -209,7 +209,7 @@ lean_obj_res l_extism_current_get_param_i32(b_lean_obj_arg current,
lean_obj_res l_extism_current_set_result_i32(b_lean_obj_arg current, uint64_t i,
uint32_t x) {
Current *c = current_plugin_unbox(current);
c->results[i].t = I32;
c->results[i].t = ExtismValType_I32;
c->results[i].v.i32 = x;
return lean_io_result_mk_ok(lean_box(0));
}
Expand All @@ -223,7 +223,7 @@ lean_obj_res l_extism_current_get_param_f32(b_lean_obj_arg current,
lean_obj_res l_extism_current_set_result_f32(b_lean_obj_arg current, uint64_t i,
double x) {
Current *c = current_plugin_unbox(current);
c->results[i].t = F32;
c->results[i].t = ExtismValType_F32;
c->results[i].v.f32 = x;
return lean_io_result_mk_ok(lean_box(0));
}
Expand All @@ -236,7 +236,7 @@ lean_obj_res l_extism_current_get_param_f64(b_lean_obj_arg current,
lean_obj_res l_extism_current_set_result_f64(b_lean_obj_arg current, uint64_t i,
double x) {
Current *c = current_plugin_unbox(current);
c->results[i].t = F64;
c->results[i].t = ExtismValType_F64;
c->results[i].v.f32 = (float)x;
return lean_io_result_mk_ok(lean_box(0));
}
Expand Down

0 comments on commit 13e5908

Please sign in to comment.