[C++-sig] Re: Can't convert to unsigned int
Nicodemus
nicodemus at globalite.com.br
Thu Dec 12 00:45:08 CET 2002
David Abrahams wrote:
>The real question is, how do we represent an unsigned integer
>constant which requires exactly 32-bits? We have 3 choices:
>
> 1. We don't (current approach, probably not acceptable)
>
> 2. PyInt_FromLong(x)
>
> 3. A Python Long representing the actual value. It's not so easy
> to write down the correct expression for this one ;-)
>
You said that 2) couldn't represent a unsigned long correctly, because
it takes as an argument a signed long (or am I missing something?)...
I don't see another way to solve this issue, but to implement unsigned
longs as PyLongs.
Dave, you said that you wasn't sure about the best approach to this
problem... what would be the disadvantages of a PyLong approach?
Nicodemus.
More information about the Cplusplus-sig
mailing list