Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d89eb2a3
Commit
d89eb2a3
authored
Jul 01, 2012
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inconsistent function name in embedding howto.
parent
cb8b792c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Doc/extending/embedding.rst
Doc/extending/embedding.rst
+2
-2
No files found.
Doc/extending/embedding.rst
View file @
d89eb2a3
...
...
@@ -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 = Py
String
_FromString(argv[1]);
pName = Py
Unicode
_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:`Py
String
_FromString` data conversion
which is constructed using the :c:func:`Py
Unicode
_FromString` data conversion
routine. ::
pFunc = PyObject_GetAttrString(pModule, argv[2]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment