Skip to content

Commit c3b049f

Browse files
authored
Typo and Incorrect Variable name
Fixes minor typo and also incorrect reference to variable name
1 parent 3c9d560 commit c3b049f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/sphinx/source/refcount.rst

Lines changed: 2 additions & 2 deletions
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)