janet-lang / janet

A dynamic language and bytecode vm
https://janet-lang.org
MIT License
3.45k stars 223 forks source link

Add bnot for int types #1210

Closed primo-ppcg closed 1 year ago

primo-ppcg commented 1 year ago

Fixes #1208

sogaiu commented 1 year ago

Thanks!

primo-ppcg commented 1 year ago

@bakpakin a copy-paste mistake, if you could patch this:

diff --git a/src/core/inttypes.c b/src/core/inttypes.c
@@ -580,7 +580,7 @@
 DIVMETHODINVERT(uint64_t, u64, mod, %)
 OPMETHOD(uint64_t, u64, and, &)
 OPMETHOD(uint64_t, u64, or, |)
 OPMETHOD(uint64_t, u64, xor, ^)
-UNARYMETHOD(int64_t, u64, not, ~)
+UNARYMETHOD(uint64_t, u64, not, ~)
 OPMETHOD(uint64_t, u64, lshift, <<)
 OPMETHOD(uint64_t, u64, rshift, >>)