Eryk Sun added the comment: The `value` of a c_char_p or c_wchar_p pointer is a Python bytes or str object. Since `value` won't consistently be the address value, it may be better to introduce a read-only `as_void` attribute that can be implemented consistently for all pointer types (including function pointers). Its value would be the same as the `value` of a casted c_void_p (e.g. NULL is mapped to None). The new attribute would be added as a getset descriptor in Pointer_getsets and PyCFuncPtr_getsets. For simple pointer types, it would have to be added specially in PyCSimpleType_new.
---------- nosy: +eryksun versions: +Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26565> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com