From: Duncan C. <dun...@wo...> - 2006-01-20 11:28:30
|
Fri Jan 20 02:59:40 PST 2006 Duncan Coutts <du...@co...> * Change ListStore & TreeStore to use the new TreeIter memory management system. Same kind of changes as for the other tree/list/view modules. hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 123 + with iter $ \iterPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 128 - iter + iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 147 + with iter $ \iterPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 150 - iter + iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 164 + with iter $ \iterPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 167 - iter + iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 180 -listStoreInsert self position = do - iter <- mallocTreeIter +listStoreInsert self position = + alloca $ \iterPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 184 - iter + iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 186 - return iter + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 193 -listStoreInsertBefore self sibling = do - iter <- mallocTreeIter +listStoreInsertBefore self sibling = + alloca $ \iterPtr -> + with sibling $ \siblingPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 198 - iter - sibling - return iter + iterPtr + siblingPtr + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 207 -listStoreInsertAfter self sibling = do - iter <- mallocTreeIter +listStoreInsertAfter self sibling = + alloca $ \iterPtr -> + with sibling $ \siblingPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 212 - iter - sibling - return iter + iterPtr + siblingPtr + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 222 -listStorePrepend self = do - iter <- mallocTreeIter +listStorePrepend self = + alloca $ \iterPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 226 - iter - return iter + iterPtr + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 235 -listStoreAppend self = do - iter <- mallocTreeIter +listStoreAppend self = + alloca $ \iterPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 239 - iter - return iter + iterPtr + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 281 + with b $ \aPtr -> + with a $ \bPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 285 - a - b + aPtr + bPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 300 + with iter $ \iterPtr -> + maybeWith with position $ \positionPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 304 - iter - (fromMaybe (TreeIter nullForeignPtr) position) + iterPtr + positionPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 317 + with iter $ \iterPtr -> + maybeWith with position $ \positionPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/ListStore.chs.pp 321 - iter - (fromMaybe (TreeIter nullForeignPtr) position) + iterPtr + positionPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 109 + with iter $ \iterPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 114 - iter + iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 133 + with iter $ \iterPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 136 - iter + iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 151 + with iter $ \iterPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 154 - iter + iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 167 -treeStoreInsert self parent position = do - iter <- mallocTreeIter +treeStoreInsert self parent position = + maybeWith with parent $ \parentPtr -> + alloca $ \iterPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 172 - iter - (fromMaybe (TreeIter nullForeignPtr) parent) + iterPtr + parentPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 175 - return iter + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 182 -treeStoreInsertBefore self sibling = do - iter <- mallocTreeIter +treeStoreInsertBefore self sibling = + with sibling $ \siblingPtr -> + alloca $ \iterPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 187 - iter - (TreeIter nullForeignPtr) - sibling - return iter + iterPtr + nullPtr + siblingPtr + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 197 -treeStoreInsertAfter self sibling = do - iter <- mallocTreeIter +treeStoreInsertAfter self sibling = + with sibling $ \siblingPtr -> + alloca $ \iterPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 202 - iter - (TreeIter nullForeignPtr) - sibling - return iter + iterPtr + nullPtr + siblingPtr + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 214 -treeStorePrepend self parent = do - iter <- mallocTreeIter +treeStorePrepend self parent = + maybeWith with parent $ \parentPtr -> + alloca $ \iterPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 219 - iter - (fromMaybe (TreeIter nullForeignPtr) parent) - return iter + iterPtr + parentPtr + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 230 -treeStoreAppend self parent = do - iter <- mallocTreeIter +treeStoreAppend self parent = + maybeWith with parent $ \parentPtr -> + alloca $ \iterPtr -> do hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 235 - iter - (fromMaybe (TreeIter nullForeignPtr) parent) - return iter + iterPtr + parentPtr + peek iterPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 248 + with iter $ \iterPtr -> + with descendant $ \descendantPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 252 - iter - descendant + iterPtr + descendantPtr hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 262 + with iter $ \iterPtr -> hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp 265 - iter + iterPtr |