We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3c9d560 + c3b049f commit 2a11b1bCopy full SHA for 2a11b1b
doc/sphinx/source/refcount.rst
@@ -40,7 +40,7 @@ Here is an example of a normal ``PyObject`` creation and deallocation:
40
PyObject *pObj = NULL;
41
42
pObj = PyBytes_FromString("Hello world\n"); /* Object creation, ref count = 1. */
43
- PyObject_Print(pLast, stdout, 0);
+ PyObject_Print(pObj, stdout, 0);
44
Py_DECREF(pObj); /* ref count becomes 0, object deallocated.
45
* Miss this step and you have a memory leak. */
46
}
@@ -64,7 +64,7 @@ Taking the above example of a normal ``PyObject`` creation and deallocation then
64
#include "Python.h"
65
66
void print_hello_world(void) {
67
- PyObject *pObj = NULL:
+ PyObject *pObj = NULL;
68
69
70
PyObject_Print(pLast, stdout, 0);
0 commit comments