mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
Makes last argument to inline-c optional
This commit is contained in:
parent
0a7550484f
commit
c0bfc07192
@ -722,8 +722,8 @@
|
||||
(list 'fn [x] (comp-internal x fns))))
|
||||
|
||||
(doc inline-c "Inlines some custom C code.")
|
||||
(defmacro inline-c [name defcode declcode]
|
||||
(eval (list 'deftemplate name (list) defcode declcode)))
|
||||
(defmacro inline-c [name defcode :rest declcode]
|
||||
(eval (list 'deftemplate name (list) defcode (if (empty? declcode) "" (car declcode)))))
|
||||
|
||||
(deftemplate bottom (Fn [] a) "$a $NAME()" "$DECL { abort(); }")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user