aboutsummaryrefslogtreecommitdiff
path: root/tests/escapei_float.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-04-02 21:13:03 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2025-04-02 21:13:03 +0300
commitd8f9699debd435da5e1aef22c94c47154be4e2be (patch)
tree3c01f1844a4832378f1fd288821200abcdfc3988 /tests/escapei_float.c
parenta9b21a1d5c55939cf3db1f3d5c857760601adb3b (diff)
downloadejit-d8f9699debd435da5e1aef22c94c47154be4e2be.tar.gz
ejit-d8f9699debd435da5e1aef22c94c47154be4e2be.zip
fix big endian compilation
+ Code used some assumptions about type aliasing that might not hold for all systems
Diffstat (limited to 'tests/escapei_float.c')
-rw-r--r--tests/escapei_float.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/escapei_float.c b/tests/escapei_float.c
index 7a1b923..7cdc30d 100644
--- a/tests/escapei_float.c
+++ b/tests/escapei_float.c
@@ -9,10 +9,8 @@ static float func(int32_t a, float b) {
static float escape_func(size_t argc, const struct ejit_arg args[argc])
{
assert(argc == 2);
- assert(args[0].type == EJIT_INT32);
- assert(args[1].type == EJIT_FLOAT);
- int32_t a = args[0].i32;
- float b = args[1].f;
+ int32_t a = EJIT_PARAM(argc, args, 0, int32_t);
+ float b = EJIT_PARAM(argc, args, 1, float);
return func(a, b);
}