mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
use correct function in example
This commit is contained in:
parent
79415523d6
commit
4482929734
|
@ -20,7 +20,7 @@ main(int argc, char *argv[])
|
|||
Py_DECREF(pName);
|
||||
|
||||
if (pModule != NULL) {
|
||||
pFunc = PyDict_GetItemString(pModule, argv[2]);
|
||||
pFunc = PyObject_GetAttrString(pModule, argv[2]);
|
||||
/* pFunc is a new reference */
|
||||
|
||||
if (pFunc && PyCallable_Check(pFunc)) {
|
||||
|
|
Loading…
Reference in a new issue