]> granicus.if.org Git - python/commitdiff
Fix inconsistent function name in embedding howto.
authorGeorg Brandl <georg@python.org>
Sun, 1 Jul 2012 07:43:20 +0000 (09:43 +0200)
committerGeorg Brandl <georg@python.org>
Sun, 1 Jul 2012 07:43:20 +0000 (09:43 +0200)
Doc/extending/embedding.rst

index 3143c990e5fbdb69142fc7d8c76edf59e7cf9452..d004d244c4d155a7430f6b477f3d75766ff84a69 100644 (file)
@@ -155,13 +155,13 @@ for data conversion between Python and C, and for error reporting.  The
 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]);