make 'c' only accept bytes and 'C' only unicode #5499

This commit is contained in:
Benjamin Peterson 2009-04-02 00:33:55 +00:00
parent 605b9d9fe8
commit 7fe9853596
4 changed files with 15 additions and 14 deletions

View file

@ -208,9 +208,13 @@ variable(s) whose address should be passed.
Convert a Python integer to a C :ctype:`Py_ssize_t`.
``c`` (string of length 1) [char]
Convert a Python character, represented as a string of length 1, to a C
Convert a Python character, represented as a byte string of length 1, to a C
:ctype:`char`.
``C`` (string of length 1) [int]
Covert a Python character, represented as a unicode string of length 1, to a
C :ctype:`int`.
``f`` (float) [float]
Convert a Python floating point number to a C :ctype:`float`.