[docs] [issue9738] Document the encoding of functions bytes arguments of the C API

Alexander Belopolsky report at bugs.python.org
Wed Dec 8 23:55:11 CET 2010

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

> A (probably crazy) idea that just occurred to me:
>  typedef char utf8_bytes;
>  typedef char iso8859_1_bytes;
>  typedef char fsenc_bytes;

I like it!  Let's see how far we can get without iso8859_1_bytes, though.  (It is likely to be locale_bytes anyways.)  There are a few places where we'll need ascii_bytes.

The added benefit is that we can make these typedefs unsigned char and avoid char signness being ambiguous.  We will also need to give the typedefs the Py_ prefix.

And an obligatory bikesheding comment: if we typedef char, we should use singular form.  Or we can typedef char* Py_utf8_bytes.


Python tracker <report at bugs.python.org>

More information about the docs mailing list