|
infix
A JIT-Powered FFI Library for C
|
Unit test for receiving bitfield structs in reverse trampolines (callbacks). More...
#include "common/compat_c23.h"#include "common/double_tap.h"#include <infix/infix.h>#include <stdint.h>#include <string.h>Classes | |
| struct | SmallBF |
| struct | LargeBF |
Macros | |
| #define | DBLTAP_IMPLEMENTATION |
Typedefs | |
| typedef void(* | small_bf_fn) (SmallBF) |
| typedef void(* | large_bf_fn) (LargeBF) |
Functions | |
| void | small_bf_handler (SmallBF bf) |
| void | large_bf_handler (LargeBF bf) |
| subtest ("Small bitfield (1 byte) in callback") | |
| subtest ("Large bitfield (4 bytes) in callback") | |
| infix_arena_destroy (arena) | |
Variables | |
| static int | g_callback_called = 0 |
| static uint8_t | g_received_a = 0 |
| static uint8_t | g_received_b = 0 |
| static int | g_large_called = 0 |
| static uint32_t | g_received_x = 0 |
| static uint32_t | g_received_y = 0 |
| static uint32_t | g_received_z = 0 |
| TEST | |
| infix_arena_t * | arena = infix_arena_create(4096) |
Unit test for receiving bitfield structs in reverse trampolines (callbacks).
| #define DBLTAP_IMPLEMENTATION |
| typedef void(* large_bf_fn) (LargeBF) |
| typedef void(* small_bf_fn) (SmallBF) |
| infix_arena_destroy | ( | arena | ) |
| void large_bf_handler | ( | LargeBF | bf | ) |
| void small_bf_handler | ( | SmallBF | bf | ) |
| subtest | ( | "Large bitfield (4 bytes) in callback" | ) |
| subtest | ( | "Small bitfield (1 byte) in callback" | ) |
| infix_arena_t* arena = infix_arena_create(4096) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |