- Timestamp:
- Jun 25, 2011, 6:42:19 AM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- b2bfe1f, af562f5, b8a3e00, e1d3607, 16ce7a4
- Parents:
- 650fb2c
- git-author:
- David Benjamin <davidben@mit.edu> (06/25/11 04:32:18)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/25/11 06:42:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
history.c
r95b52d1 r25891a8 6 6 h->cur = h->hist.tail; /* current position in history */ 7 7 h->partial = false; /* is the 0th element is partially composed? */ 8 } 9 10 void owl_history_cleanup(owl_history *h) 11 { 12 g_queue_foreach(&h->hist, (GFunc)g_free, NULL); 13 g_queue_clear(&h->hist); 8 14 } 9 15 … … 40 46 41 47 /* if we've reached the max history size, pop off the last element */ 42 if (g_queue_get_length(&h->hist) > OWL_HISTORYSIZE)48 if (g_queue_get_length(&h->hist) >= OWL_HISTORYSIZE) 43 49 g_free(g_queue_pop_head(&h->hist)); 44 50
Note: See TracChangeset
for help on using the changeset viewer.