[Gambas-devel-svn] SF.net SVN: gambas:[5778] gambas/trunk/main/lib/data
Brought to you by:
gambas
From: <tob...@us...> - 2013-08-09 18:31:24
|
Revision: 5778 http://sourceforge.net/p/gambas/code/5778 Author: tobiasboe Date: 2013-08-09 18:31:20 +0000 (Fri, 09 Aug 2013) Log Message: ----------- [GB.DATA] * BUG: Fix possible bugs when updating an invalid Current. * BUG: Really erase old elements instead of just marking them as Null to prevent (potential) information leaks. * OPT: Current and the enumerators (internally) carry list global indices (LGI) which can be used as anchor points together with List.Count to speed up traversals (always taking the shortest way through the list). * OPT: Remove workaround code related to an enumerator bug fixed in #5749. * NEW: Expose List.Current as a virtual object representing the current list element which has Append() and Prepend() methods to manipulate the list not only around its head. This breaks backwards compatibility. * NEW: List.Value is what List.Current has meant formerly. * NEW: Add List.Current.Index and List.Index which are an absolute index of the current element into the list. These are guaranteed to be in bounds of [-List.Count; List.Count - 1]. Note that each non-negative index has an associated negative equivalent and vice versa. They work like the indices given to List._get(). * NEW: Add a List.AutoNormalize property which instructs the list to automatically make indices (like resulting from a calculation) fit into the List bounds preserving the sign of the given index. This effectively prevents any "Out of bounds" errors. * NEW: Add List.MoveTo() to point Current to an index. * NEW: List.Current.Is{First,Last,Valid} can be used to determine if Current is the first or last element of the list or if it is valid, respectively. Modified Paths: -------------- gambas/trunk/main/lib/data/c_circular.c gambas/trunk/main/lib/data/c_circular.h gambas/trunk/main/lib/data/c_deque.c gambas/trunk/main/lib/data/c_deque.h gambas/trunk/main/lib/data/c_list.c gambas/trunk/main/lib/data/c_list.h gambas/trunk/main/lib/data/main.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |