Skip to content

Commit

Permalink
Use a proc for makeHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
beef331 committed Jan 4, 2024
1 parent b417ed5 commit 40204e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions seeya.nim
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var
generatedTypes {.compileTime, used.}: HashSet[TypedNimNode]
codeFormatter* {.compileTime, used.} = ""

macro makeHeader*(location: static string): untyped =
proc makeHeader*(location: static string) {.compileTime.} =
when defined(genHeader):
var file = ""
for header in headers:
Expand Down Expand Up @@ -607,4 +607,4 @@ when isMainModule:

var myGlobal {.exporterVar, expose.} = MyOtherType(rng: 3, otherRange: 3)
var inheritance {.exporterVar, expose.} = Child(x: 300)
makeHeader("tests/gend.h")
static: makeHeader("tests/gend.h")
2 changes: 1 addition & 1 deletion seeya.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.1.0"
version = "0.1.1"
author = "Jason"
description = "Generates headers from nim code"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion tests/mylib.nim
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ let
do_stuff_float {.exporterVar, expose.} = doStuff[float]
do_stuff_seq_float {.exporterVar, expose.} = doStuff[seq[float]]

makeHeader("tests/mylib.h")
static: makeHeader("tests/mylib.h")

0 comments on commit 40204e5

Please sign in to comment.