more uint related fixes

This commit is contained in:
Zahary Karadjov 2012-06-14 17:33:00 +03:00
commit b11fe5d0b4
12 changed files with 151 additions and 139 deletions

View file

@ -18,9 +18,9 @@ type
TRune* = distinct irune ## type that can hold any Unicode character
TRune16* = distinct int16 ## 16 bit Unicode character
proc `<=%`*(a, b: TRune): bool {.borrow.}
proc `<%`*(a, b: TRune): bool {.borrow.}
proc `==`*(a, b: TRune): bool {.borrow.}
proc `<=%`*(a, b: TRune): bool = return int(a) <=% int(b)
proc `<%`*(a, b: TRune): bool = return int(a) <% int(b)
proc `==`*(a, b: TRune): bool = return int(a) == int(b)
template ones(n: expr): expr = ((1 shl n)-1)