klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

kencapsulation.h (554B)


      1 /*
      2 ** kencapsulation.h
      3 ** Kernel Encapsulation Types
      4 ** See Copyright Notice in klisp.h
      5 */
      6 
      7 #ifndef kencapsulation_h
      8 #define kencapsulation_h
      9 
     10 #include "kobject.h"
     11 #include "kstate.h"
     12 
     13 /* GC: Assumes that key & val are rooted */
     14 TValue kmake_encapsulation(klisp_State *K, TValue key, TValue val);
     15 
     16 TValue kmake_encapsulation_key(klisp_State *K);
     17 bool kis_encapsulation_type(TValue enc, TValue key);
     18 
     19 /* LOCK: these are immutable, so they don't need locking */
     20 #define kget_enc_val(e_)(tv2enc(e_)->value)
     21 #define kget_enc_key(e_)(tv2enc(e_)->key)
     22 
     23 #endif