Segmentation fault in C python extension
According to the docs for PyArg_ParseTupleAndKeywords
, the keywords
argument expects a NULL-terminated array of keyword parameter names.
Add an additional NULL
element to your kwargs_list
:
static char *kwargs_list[] = {"attacker", "victim", "game_hardness", NULL};