31 /* Start python and load hearts.py */
32 void python_start(void)
33 {
34 Py_Initialize();
calling Py_Initialize()
35 initplayer_api();
36 PyObject *module = PyImport_AddModule("__main__");
when PyImport_AddModule() succeeds
37 PyObject *dict = PyModule_GetDict(module);
38
39 FILE* file = fopen(PYTHON_DIR"/gnome-hearts/hearts.py", "r");
40 g_assert(file);
when treating unknown struct FILE * from player-api.c:39 as non-NULL
taking True path
taking True path
41 PyRun_File(file, "hearts.py", Py_file_input, dict, dict);
when PyRun_FileExFlags() succeeds
new ref from (unknown) PyRun_FileExFlags allocated at: PyRun_File(file, "hearts.py", Py_file_input, dict, dict);
ob_refcnt is now refs: 1 + N where N >= 0
42 if (PyErr_Occurred())
PyErr_Occurred()
taking False path
43 {
44 PyErr_Print();
45 g_assert_not_reached();
46 }
47 fclose(file);
48 }
returning
ob_refcnt of new ref from (unknown) PyRun_FileExFlags is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1