diff options
author | shirleyquirk <31934565+shirleyquirk@users.noreply.github.com> | 2021-04-17 16:27:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-17 17:27:10 +0200 |
commit | c8b8cb8458cf0aa5a33e9a94209ee1cb6df7646c (patch) | |
tree | da740abaaca953c27765d560be0e9055884602ee | |
parent | 8e124da75d7b3cafe27c197a027d34f1aca012e3 (diff) | |
download | Nim-c8b8cb8458cf0aa5a33e9a94209ee1cb6df7646c.tar.gz |
make cuchar alias uint8 instead of char (#17738)
-rw-r--r-- | changelog.md | 2 | ||||
-rw-r--r-- | lib/system.nim | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index cfdcd3c62..5efde5659 100644 --- a/changelog.md +++ b/changelog.md @@ -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. diff --git a/lib/system.nim b/lib/system.nim index 38f6d64d3..b7a4b45cf 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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*. |