diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-19 23:21:41 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-19 23:21:41 -0700 |
commit | 1ebafaf91f4f2bb09a1f4d23d7bfcfa97506a0e8 (patch) | |
tree | 686dd3007265a9e16a122521e3b18e6351006944 /eval.c | |
parent | 9dbcde8882a8a917b6d0329e06ea2232e62b1c8c (diff) | |
download | txr-1ebafaf91f4f2bb09a1f4d23d7bfcfa97506a0e8.tar.gz txr-1ebafaf91f4f2bb09a1f4d23d7bfcfa97506a0e8.tar.bz2 txr-1ebafaf91f4f2bb09a1f4d23d7bfcfa97506a0e8.zip |
cptr-int and cptr-obj can make typed cptr objects.
* eval.c (eval_init): Update registration of cptr-int and
cptr-obj with one optional argument.
* lib.c (cptr_int): New type symbol argument, defaulting
to nil. Also, don't bother defaulting the integer argument;
the function isn't registered for that being optional.
(cptr_obj): New type symbol argument, defaulting to nil.
* lib.h (cptr_int, cptr_obj): Declarations updated.
* txr.1: Documented cptr-int and cptr-obj function changes.
Added discussion of type tag to introductory paragraph.
Also added neglected documentation of the FFI cptr type,
both unparametrized and parametrized.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6157,8 +6157,8 @@ void eval_init(void) reg_fun(intern(lit("rlcp"), user_package), func_n2(rlcp)); reg_fun(intern(lit("rlcp-tree"), user_package), func_n2(rlcp_tree)); - reg_fun(intern(lit("cptr-int"), user_package), func_n1(cptr_int)); - reg_fun(intern(lit("cptr-obj"), user_package), func_n1(cptr_obj)); + reg_fun(intern(lit("cptr-int"), user_package), func_n2o(cptr_int, 1)); + 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("cptrp"), user_package), func_n1(cptrp)); |