colnotab / cpython

The Python programming language
https://www.python.org/
Other
0 stars 0 forks source link

Change unsigned char -> uint8_t #1

Closed ammaraskar closed 3 years ago

isidentical commented 3 years ago

I think we should stick with the unsigned char, since that is also what is used by the linetable. I recall there might be some references on the PEP, if that is the case I think we should update the PEP.

ammaraskar commented 3 years ago

@pablogsal Thoughts on this? I believe you were the one who made unsigned char into uint8_t on the PEP. Personally I think uint8_t is more descriptive type for this, regardless of consistency with the line table but I don't feel too strongly about it.

pablogsal commented 3 years ago

@pablogsal Thoughts on this? I believe you were the one who made unsigned char into uint8_t on the PEP. Personally I think uint8_t is more descriptive type for this, regardless of consistency with the line table but I don't feel too strongly about it.

Given that we are moving this to a bytes object in Python, unsigned char makes that more explicit (and also saves us from some edge cases in 32 bits, IIRC). We can revisit this at the end of the work, but I think that also given that we have a bunch of APIs already for the line table, is good to be cosnistent so we can reuse them as much as possible,