74 static PyObject *
75 HunSpell_suggest(HunSpell * self, PyObject *args)
76 {
77 char *word, **slist;
78 int i, num_slist;
79 PyObject *slist_list;
80
81 if (!PyArg_ParseTuple(args, "s", &word))
when PyArg_ParseTuple() succeeds
taking False path
82 return NULL;
83
84 slist_list = PyList_New(0);
when PyList_New() succeeds
85 num_slist = Hunspell_suggest(self->handle, &slist, word);
86
87 for (i = 0; i < num_slist; i++) {
when considering range: 1 <= value <= 0x7fffffff
taking True path
when considering value == (int)1 from hunspell.c:85
taking False path
88 PyList_Append(slist_list, Py_BuildValue("s", slist[i]));
when treating unknown char * * from hunspell.c:88 as non-NULL
when Py_BuildValue() succeeds
when PyList_Append() succeeds
new ref from call to Py_BuildValue allocated at: PyList_Append(slist_list, Py_BuildValue("s", slist[i]));
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 2 + N where N >= 0
new ref from call to Py_BuildValue is now referenced by 1 non-stack value(s): PyListObject.ob_item[0]
89 }
90
91 Hunspell_free_list(self->handle, &slist, num_slist);
92 return slist_list;
93 }
ob_refcnt of new ref from call to Py_BuildValue is 1 too high
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: PyListObject.ob_item[0]
but final ob_refcnt is N + 2
found 1 similar trace(s) to this