File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Here is an example of a normal ``PyObject`` creation and deallocation:
40
40
PyObject *pObj = NULL;
41
41
42
42
pObj = PyBytes_FromString("Hello world\n"); /* Object creation, ref count = 1. */
43
- PyObject_Print(pLast , stdout, 0);
43
+ PyObject_Print(pObj , stdout, 0);
44
44
Py_DECREF(pObj); /* ref count becomes 0, object deallocated.
45
45
* Miss this step and you have a memory leak. */
46
46
}
@@ -64,7 +64,7 @@ Taking the above example of a normal ``PyObject`` creation and deallocation then
64
64
#include "Python.h"
65
65
66
66
void print_hello_world(void) {
67
- PyObject *pObj = NULL:
67
+ PyObject *pObj = NULL;
68
68
69
69
pObj = PyBytes_FromString("Hello world\n"); /* Object creation, ref count = 1. */
70
70
PyObject_Print(pLast, stdout, 0);
You can’t perform that action at this time.
0 commit comments