summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-28 20:38:49 (GMT)
committerGeorg Brandl <georg@python.org>2014-10-28 20:38:49 (GMT)
commite9e24b55a64e5df149d94d320a71bdd799d7d82b (patch)
tree4106ab5c32f8577de80c7e239f32c931132a0d90
parentae4ca79574bac3a51a6fb05dbbe9a0d1612d8b61 (diff)
downloadcpython-e9e24b55a64e5df149d94d320a71bdd799d7d82b.zip
cpython-e9e24b55a64e5df149d94d320a71bdd799d7d82b.tar.gz
cpython-e9e24b55a64e5df149d94d320a71bdd799d7d82b.tar.bz2
Closes #22748: there are no PyString C functions in 3.x.
-rw-r--r--Doc/howto/cporting.rst7
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/howto/cporting.rst b/Doc/howto/cporting.rst
index 1ad77d6..6ebcc41 100644
--- a/Doc/howto/cporting.rst
+++ b/Doc/howto/cporting.rst
@@ -43,10 +43,9 @@ separating others.
str/unicode Unification
-----------------------
-
-Python 3's :func:`str` (``PyString_*`` functions in C) type is equivalent to
-Python 2's :func:`unicode` (``PyUnicode_*``). The old 8-bit string type has
-become :func:`bytes`. Python 2.6 and later provide a compatibility header,
+Python 3's :func:`str` type is equivalent to Python 2's :func:`unicode`; the C
+functions are called ``PyUnicode_*`` for both. The old 8-bit string type has become
+:func:`bytes`, with C functions called ``PyBytes_*``. Python 2.6 and later provide a compatibility header,
:file:`bytesobject.h`, mapping ``PyBytes`` names to ``PyString`` ones. For best
compatibility with Python 3, :c:type:`PyUnicode` should be used for textual data and
:c:type:`PyBytes` for binary data. It's also important to remember that