Files
hakmem/src/hako/ffi_stub.c

40 lines
1.4 KiB
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.

// src/hako/ffi_stub.c — Minimal stubs (nonintrusive). Return ENOSYS where applicable.
#include "hako/ffi.h"
#include <errno.h>
#include <stdio.h>
#define HAKO_FFI_STUB_NOTE(msg) do { (void)msg; } while(0)
static void stub_note(const char* fn) {
static int once = 0;
if (!once) {
fprintf(stderr, "[HAKO FFI STUB] %s (noop)\n", fn);
once = 1;
}
}
void nyash_map_set_h (HakoHandle map, int64_t key, int64_t val) {
(void)map; (void)key; (void)val; stub_note(__func__); errno = ENOSYS;
}
void nyash_map_set_hh(HakoHandle map, HakoHandle key, HakoHandle val) {
(void)map; (void)key; (void)val; stub_note(__func__); errno = ENOSYS;
}
void nyash_map_set_ha(HakoHandle map, int64_t key, HakoHandle val) {
(void)map; (void)key; (void)val; stub_note(__func__); errno = ENOSYS;
}
void nyash_map_set_ah(HakoHandle map, HakoHandle key, int64_t val) {
(void)map; (void)key; (void)val; stub_note(__func__); errno = ENOSYS;
}
HakoHandle nyash_map_get_h (HakoHandle map, int64_t key) {
(void)map; (void)key; stub_note(__func__); errno = ENOSYS; return (HakoHandle)0;
}
HakoHandle nyash_map_get_hh(HakoHandle map, HakoHandle key) {
(void)map; (void)key; stub_note(__func__); errno = ENOSYS; return (HakoHandle)0;
}
int64_t nyash_unbox_i64(HakoHandle h, int* ok) {
(void)h; stub_note(__func__); if (ok) *ok = 0; errno = ENOSYS; return 0;
}