Feb-13-2018, 09:00 PM
(This post was last modified: Feb-13-2018, 09:00 PM by Gribouillis.)
AFAIK PyArg_ParseTuple does not incref the item, but you don't need to incref it yourself, because there is already a reference on the item in the argument tuple. If you don't incref it, you must not decref it upon leaving the function. If your code calls List_Append, it will probably keep a reference to the item, which means that List_Append needs to incref the item one way or another.
I found a <document> that may help you.
About the assert question, can you elaborate on the issue, because I run your code and I get
I found a <document> that may help you.
About the assert question, can you elaborate on the issue, because I run your code and I get
Output:Traceback (most recent call last):
File "asserttruc.py", line 7, in <module>
run_test( unit_test )
File "asserttruc.py", line 5, in run_test
func()
File "asserttruc.py", line 2, in unit_test
assert(False)
AssertionError