Message31818
It is easy to distinguish between a c_char_p that is created from a python string from one that is created from a python int: the former has an _objects attribute set to a string:
>>> x,y = map(c_char_p, ('abc',42))
>>> (x._objects,y._objects)
('abc', None)
It may be reasonable to give up a "nice" repr for the cases where c_char_p is not known to point into a python string. You can still keep "nice" str, so users can still enjoy a crash by printing c_char_p(42). :-) |
|
Date |
User |
Action |
Args |
2007-08-23 14:53:10 | admin | link | issue1701409 messages |
2007-08-23 14:53:10 | admin | create | |
|