make cuchar alias uint8 instead of char (#17738)

This commit is contained in:
shirleyquirk 2021-04-17 16:27:10 +01:00 • committed by GitHub
commit c8b8cb8458
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -4,6 +4,8 @@
## Changes affecting backward compatibility
- `cuchar` now aliases `uint8` instead of `char`
- `repr` now doesn't insert trailing newline; previous behavior was very inconsistent,
see #16034. Use `-d:nimLegacyReprWithNewline` for previous behavior.

View file

@ -1452,7 +1452,7 @@ type # these work for most platforms:
## This is the same as the type `long double` in *C*.
## This C type is not supported by Nim's code generator.
cuchar* {.importc: "unsigned char", nodecl.} = char
cuchar* {.importc: "unsigned char", nodecl.} = uint8
## This is the same as the type `unsigned char` in *C*.
cushort* {.importc: "unsigned short", nodecl.} = uint16
## This is the same as the type `unsigned short` in *C*.