Sample project to find out the behaviour of typemap and Py_INCREF.
When you forgot to call Py_INCREF
for PyObject (such as Py_True and Py_False),
program is going to crash after that Python decrement its refcount and deallocate it.
$ make
$ make run
Comment out Py_INCREF
in incref.i.
Build and run it, then you can see it crash.