jolt/ffi_smoke.clj
Yogthos 23f6fee250 Split host-static.ss into base / statics / objects
The 929-line interop registry split three ways: host-static.ss keeps the
registries, the jhost record, the emit entry points and coercion helpers;
host-static-statics.ss holds the java.lang/util static-method registrations;
host-static-objects.ss holds the host object classes (ArrayList, HashMap, the
reader/writer/tokenizer shims, ctors, URL codecs) and the instance? hook. rt.ss
loads the three in order. Runtime shim — no seed change.
2026-06-23 04:16:43 -04:00

13 lines
427 B
Clojure

(ns ffi-smoke
(:require [jolt.ffi :as ffi]))
(ffi/load-library "libglib-2.0.dylib")
(prn :sizeof-pointer (ffi/sizeof :pointer))
(prn :null (ffi/null))
(prn :null? (ffi/null? (ffi/null)))
(ffi/defcfn g-get-monotonic-time "g_get_monotonic_time" [] :int64)
(prn :monotonic-time (g-get-monotonic-time))
(let [p (ffi/alloc 16)]
(ffi/write p :int64 0 42)
(prn :wrote-and-read (ffi/read p :int64 0))
(ffi/free p))
(prn :done)