From: David Abrahams (abrahams_at_[hidden])
Date: 2001-02-08 13:56:23
----- Original Message -----
> I just noticed that char, unsigned char, and signed char are three
> distinct C++ types. Trying to wrap a function that returns or uses
> a char results in weird compiler error messages. Wouldn't it be
> useful to also define to/from_python converters for plain char?
You notice correctly: in C++, [plain] char, signed char, and unsigned char
are all distinct types. AFAIK, [plain] char is the only one habitually used
for characters so mapping it to Python strings seems appropriate. The
others, IMO, should be mapped to/from integers.
> An alternative would be to map signed/unsigned char to Python integer,
> and char to one-character Python strings.
> What do other people think about this?
So, I agree with your final conclusion.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk