Files
hakmem/include/hako/ffi.h

31 lines
788 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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 — multiform API specialized by the frontend
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