31 lines
788 B
C
31 lines
788 B
C
// include/hako/ffi.h — Minimal Hako FFI surface (map, unbox)
|
||
#ifndef HAKO_FFI_H
|
||
#define HAKO_FFI_H
|
||
|
||
#include "hako/types.h"
|
||
#include <stdint.h>
|
||
#include <stddef.h>
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
// nyash.map — multi‑form API specialized by the front‑end
|
||
void nyash_map_set_h (HakoHandle map, int64_t key, int64_t val);
|
||
void nyash_map_set_hh(HakoHandle map, HakoHandle key, HakoHandle val);
|
||
void nyash_map_set_ha(HakoHandle map, int64_t key, HakoHandle val);
|
||
void nyash_map_set_ah(HakoHandle map, HakoHandle key, int64_t val);
|
||
|
||
HakoHandle nyash_map_get_h (HakoHandle map, int64_t key);
|
||
HakoHandle nyash_map_get_hh(HakoHandle map, HakoHandle key);
|
||
|
||
// Unboxing helpers
|
||
int64_t nyash_unbox_i64(HakoHandle h, int* ok);
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
|
||
#endif // HAKO_FFI_H
|
||
|