This commit is contained in:
2020-02-17 11:22:31 +01:00
commit f03f085966
4 changed files with 73 additions and 0 deletions

9
main.carp Normal file
View File

@@ -0,0 +1,9 @@
(defdynamic *c-counter* 0)
(defndynamic inline-c [s]
(let [f (String.join [(Project.get-config "output-directory")
"carp_inline_c_generated" (str *c-counter*) ".h"])]
(do
(write-file f s)
(defdynamic *c-counter* (inc *c-counter*))
(system-include f))))