184 void player_receive_cards (Player *player, GList *list)
185 {
186 /* Add the cards to the hand */
187 cards_hand_add(player->hand, list);
188 player_publish_hand(player);
when treating unknown struct Player * from player.c:185 as non-NULL
189
190 /* call receive_cards() on the player */
191 GList *l;
192 PyObject *result;
193 PyObject *cards = PyList_New(0);
194
when PyList_New() succeeds
195 for (l = list; l; l = l->next)
196 {
when treating unknown struct GList * from player.c:185 as non-NULL
taking True path
when treating unknown struct GList * from player.c:196 as NULL
taking False path
197 Card *card = (Card*)l->data;
198 PyList_Append(cards, Py_BuildValue("(ii)", card->suit, card->rank));
199 }
when treating unknown void * from player.c:198 as non-NULL
when Py_BuildValue() succeeds
when PyList_Append() succeeds
new ref from call to Py_BuildValue allocated at: PyList_Append(cards, Py_BuildValue("(ii)", card->suit, card->rank));
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 2 + N where N >= 0
new ref from call to Py_BuildValue is now referenced by 1 non-stack value(s): PyListObject.ob_item[0]
200
201 result = PyObject_CallMethod(player->ai, "receive_cards", "O", cards);
202 if (PyErr_Occurred())
when PyObject_CallMethod() succeeds
203 {
PyErr_Occurred()
taking False path
204 PyErr_Print();
205 g_assert_not_reached();
206 }
207 Py_DECREF(cards);
208 Py_DECREF(result);
when taking True path
209 }
when taking True path
210