summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-26 06:39:24 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-26 06:39:24 -0700
commit86d5c1a3fcf5f9fcbcbf312eea3d6fad7f6bd10d (patch)
tree8221e9e8446b7ec862bfabbed849cf6b440a804b /eval.c
parentabd32610d0c1b75226e0edb6a34c54723de83eb6 (diff)
downloadtxr-86d5c1a3fcf5f9fcbcbf312eea3d6fad7f6bd10d.tar.gz
txr-86d5c1a3fcf5f9fcbcbf312eea3d6fad7f6bd10d.tar.bz2
txr-86d5c1a3fcf5f9fcbcbf312eea3d6fad7f6bd10d.zip
New cptr functions cptr-cast and int-cptr.
* eval.c (eval_init): Register new intrinsics cptr-cast and int-cptr. * lib.c (cptr_cast, int_cptr): New functions. * lib.h (cptr_cast, int_cptr): Declared. * txr.1: Documented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 46c9bb72..3bdb29f5 100644
--- a/eval.c
+++ b/eval.c
@@ -6161,6 +6161,8 @@ void eval_init(void)
reg_fun(intern(lit("cptr-obj"), user_package), func_n2o(cptr_obj, 1));
reg_fun(intern(lit("cptr-zap"), user_package), func_n1(cptr_zap));
reg_fun(intern(lit("cptr-free"), user_package), func_n1(cptr_free));
+ reg_fun(intern(lit("cptr-cast"), user_package), func_n2(cptr_cast));
+ reg_fun(intern(lit("int-cptr"), user_package), func_n1(int_cptr));
reg_fun(intern(lit("cptrp"), user_package), func_n1(cptrp));
reg_fun(intern(lit("cptr-type"), user_package), func_n1(cptr_type));
reg_varl(intern(lit("cptr-null"), user_package), cptr(0));