I'm trying to debug and find my error. It goes wrong when: PyObject *v; v = va_arg(*p_va, PyObject *); if (v != NULL) { if (*(*p_format - 1) != 'N') Py_INCREF(v); } it tries to PyINCREF to my passed callback.