diff options
Diffstat (limited to 'Doc/c-api/intro.rst')
-rw-r--r-- | Doc/c-api/intro.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst index 6464fe7..bc3a752 100644 --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@ -210,7 +210,7 @@ error handling for the moment; a better way to code this is shown below):: t = PyTuple_New(3); PyTuple_SetItem(t, 0, PyLong_FromLong(1L)); PyTuple_SetItem(t, 1, PyLong_FromLong(2L)); - PyTuple_SetItem(t, 2, PyString_FromString("three")); + PyTuple_SetItem(t, 2, PyUnicode_FromString("three")); Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object |