[Python-checkins] cpython (3.2): Fix inconsistent function name in embedding howto.
georg.brandl
python-checkins at python.org
Sun Jul 1 09:49:26 CEST 2012
http://hg.python.org/cpython/rev/275601fdc285
changeset: 77907:275601fdc285
branch: 3.2
parent: 77882:177f93f0f5b9
user: Georg Brandl <georg at python.org>
date: Sun Jul 01 09:43:20 2012 +0200
summary:
Fix inconsistent function name in embedding howto.
files:
Doc/extending/embedding.rst | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst
--- a/Doc/extending/embedding.rst
+++ b/Doc/extending/embedding.rst
@@ -155,13 +155,13 @@
interesting part with respect to embedding Python starts with ::
Py_Initialize();
- pName = PyString_FromString(argv[1]);
+ pName = PyUnicode_FromString(argv[1]);
/* Error checking of pName left out */
pModule = PyImport_Import(pName);
After initializing the interpreter, the script is loaded using
:c:func:`PyImport_Import`. This routine needs a Python string as its argument,
-which is constructed using the :c:func:`PyString_FromString` data conversion
+which is constructed using the :c:func:`PyUnicode_FromString` data conversion
routine. ::
pFunc = PyObject_GetAttrString(pModule, argv[2]);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list