diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-26 20:43:32 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-26 20:45:17 +0100 |
commit | 2d5245d9ecc920c81b39e790bc3e396a61381849 (patch) | |
tree | a491b9761dec78f4f53e588f92452a8753848980 /src/js/javascript.nim | |
parent | 9c78cc3ce8b3345f95cb37a2a9d2101f52ecaa41 (diff) | |
download | chawan-2d5245d9ecc920c81b39e790bc3e396a61381849.tar.gz |
Correct attribute functions, de-extern jserr
Instead of unnecessarily marking every jserr function as *, add the used pragma (so the C compiler can get rid of them later.) Also, use the correct definition of attribute namespace.
Diffstat (limited to 'src/js/javascript.nim')
-rw-r--r-- | src/js/javascript.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/js/javascript.nim b/src/js/javascript.nim index 5e038290..1876326d 100644 --- a/src/js/javascript.nim +++ b/src/js/javascript.nim @@ -1276,6 +1276,7 @@ macro jserr*(fun: untyped) = for i in 0..<pragma.len: if pragma[i].eqIdent(ident("jsctor")) or pragma[i].eqIdent(ident("jsfunc")) or pragma[i].eqIdent(ident("jsget")) or pragma[i].eqIdent(ident("jsset")): pragma.del(i) + gen.original.addPragma(quote do: used) # may be unused, but we have to keep it gen.copied.addPragma(quote do: inline) #TODO mark original as used or something |