Skip to content

Commit 2a11b1b

Browse files
authored
Merge pull request paulross#16 from gdevanla/patch-1
Typo and Incorrect Variable name
2 parents 3c9d560 + c3b049f commit 2a11b1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/sphinx/source/refcount.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Here is an example of a normal ``PyObject`` creation and deallocation:
4040
PyObject *pObj = NULL;
4141
4242
pObj = PyBytes_FromString("Hello world\n"); /* Object creation, ref count = 1. */
43-
PyObject_Print(pLast, stdout, 0);
43+
PyObject_Print(pObj, stdout, 0);
4444
Py_DECREF(pObj); /* ref count becomes 0, object deallocated.
4545
* Miss this step and you have a memory leak. */
4646
}
@@ -64,7 +64,7 @@ Taking the above example of a normal ``PyObject`` creation and deallocation then
6464
#include "Python.h"
6565
6666
void print_hello_world(void) {
67-
PyObject *pObj = NULL:
67+
PyObject *pObj = NULL;
6868
6969
pObj = PyBytes_FromString("Hello world\n"); /* Object creation, ref count = 1. */
7070
PyObject_Print(pLast, stdout, 0);

0 commit comments

Comments
 (0)