summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Pässler <milan@petabyte.dev>2021-03-13 15:11:18 +0100
committerMilan Pässler <milan@petabyte.dev>2021-03-13 15:11:18 +0100
commiteb52a606f9aa6d5317e2b9adc37dc92d79ca11c6 (patch)
tree44fbfee002c491ffadf6b2bbe97ba43ebf4df1b7
parent6c2b1b777bc3903930a7e28d0f5800c2e72ab2ab (diff)
downloadnimjpg-eb52a606f9aa6d5317e2b9adc37dc92d79ca11c6.tar.gz
nimjpg-eb52a606f9aa6d5317e2b9adc37dc92d79ca11c6.tar.bz2
nimjpg-eb52a606f9aa6d5317e2b9adc37dc92d79ca11c6.zip
install utils.nim
-rw-r--r--jpgnim.nimble2
-rw-r--r--utils.nim3
2 files changed, 4 insertions, 1 deletions
diff --git a/jpgnim.nimble b/jpgnim.nimble
index 2a514ca..b7f3bbd 100644
--- a/jpgnim.nimble
+++ b/jpgnim.nimble
@@ -6,7 +6,7 @@ description = "Read jpg headers"
license = "GPL-3.0"
srcDir = "./"
bin = @["example", "example_sync"]
-installFiles = @["jpgnim.nim"]
+installFiles = @["jpgnim.nim", "utils.nim"]
# Dependencies
requires "nim >= 1.4"
diff --git a/utils.nim b/utils.nim
index fb7634e..2eb09ae 100644
--- a/utils.nim
+++ b/utils.nim
@@ -8,6 +8,9 @@ template error*(x: varargs[untyped]) =
echo(x)
quit(1)
+# These are shim functions to make a Stream usable like an AyncFile
+# This is so we can use the multisync macro
+
proc read*(stream: Stream, length: int): string =
return stream.readStr(length)