4 Commits

Author SHA1 Message Date
4942896241 version bump 2020-05-05 13:36:24 +02:00
a263017504 update for new carp 2020-05-05 13:35:29 +02:00
75e98123df published new version 2020-04-21 10:36:21 +02:00
346c7190ec update to new carp 2020-04-21 10:35:45 +02:00
2 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ is a simple module for defining C code inside Carp code.
## Installation
```clojure
(load "https://veitheller.de/git/carpentry/inline-c@0.0.1")
(load "https://veitheller.de/git/carpentry/inline-c@0.0.3")
```
## Usage
@@ -16,7 +16,7 @@ express those things that are just kind of awkward in Carp (like complex
bit-twiddling) without having to include a helper every time.
```clojure
(load "https://veitheller.de/git/carpentry/inline-c@0.0.1")
(load "https://veitheller.de/git/carpentry/inline-c@0.0.3")
(inline-c "int count_set_bits(int n) {
int count = 0;

View File

@@ -1,9 +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"])]
(let [f (String.concat [(Project.get-config "output-directory")
"carp_inline_c_generated" (str *c-counter*) ".h"])]
(do
(write-file f s)
(defdynamic *c-counter* (inc *c-counter*))
(set! *c-counter* (inc *c-counter*))
(system-include f))))