Skip to content

Conversation

@shirleyquirk
Copy link
Contributor

split from #17728

@timotheecour
Copy link
Member

timotheecour commented Apr 16, 2021

is this a good change?
before PR:

nim --eval:'echo (cuchar.low.ord, cuchar.high.ord, cuchar.low, cuchar.high)'
(0, 255, '\x00', '\xFF')
=> seems fine

after PR:
nim --lib:lib --eval:'echo (cuchar.low.ord, cuchar.high.ord, cuchar.low, cuchar.high)'
(0, 255, 0, 255)
=> seems less good

at least this needs more rationale

@ghost
Copy link

ghost commented Apr 16, 2021

@timotheecour why do you think that it's "less good"? unsigned char shouldn't be used to represent text characters, it's for unsigned 8 bits integers

@ghost
Copy link

ghost commented Apr 16, 2021

Also, it's more consistent with what we have already - cschar (C's signed char) is int8 in system - https://nim-lang.org/docs/system.html#cschar, just how it should be.

@Araq Araq merged commit c8b8cb8 into nim-lang:devel Apr 17, 2021
PMunch pushed a commit to PMunch/Nim that referenced this pull request Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants