summary refs log tree commit diff stats
path: root/lib/pure/collections/tables.nim
Commit message (Collapse)AuthorAgeFilesLines
* make more tests greenAndreas Rumpf2018-08-141-1/+1
|
* Clarify the docs for tables.del (#8134)Yuriy Glukhov2018-06-271-4/+6
|
* Merge pull request #7075 from lcrees/get_defaultDominik Picheta2018-03-291-13/+80
|\ | | | | Add default argument to tables.getOrDefault
| * Add default argument to 'tables.getOrDefault'lcrees2018-01-131-13/+80
| |
* | Fix toCountTable and newCountTablekonqoro2018-02-211-21/+20
|/
* Tables: toCountTable: Update docs.Konstantin Molchanov2017-12-271-1/+2
|
* Tables: make `toCountTable` actually count the elements of the input openArray.Konstantin Molchanov2017-12-271-1/+1
|
* Fix counttable smallest loop start (#6917)GULPF2017-12-151-3/+3
| | | | | | * Fix counttable smallest * Fix counttable smallest loop start
* Improved collection-to-string behavior (#6825)Fabian Keller2017-12-141-2/+2
|
* Fix counttable smallest (#6912)GULPF2017-12-131-2/+7
|
* improve the docs for tables.addAraq2017-12-121-0/+4
|
* Fix #4366 (#6290)Daniil Yarancev2017-09-021-1/+1
|
* tables.nim: use proper spacingAndreas Rumpf2017-08-311-5/+5
|
* fixes #6250 (#6251)David Krause2017-08-171-1/+15
|
* fix orderedtable enlarge proc. (#5937)Parashurama2017-06-051-2/+5
| | | This fixes issue #5917
* Implement 'take' for Table and TableRef (#5773)Ruslan Mustakov2017-05-041-11/+30
|
* Minor: spelling correction in tables.nim (#5727)Zach Smith2017-04-191-2/+2
|
* fixes #5487 (#5494)David Krause2017-03-071-15/+49
|
* Fix for #5482, let OrderedTable accept multiple keys (#5485)David Krause2017-03-051-1/+15
|
* reenabled clear test, made clear working (#5323)Arne Döring2017-02-021-2/+5
|
* Fix description of CountTable's smallest procPaweł Świątkowski2016-12-111-2/+2
|
* Corrected test case for #5057.Yuriy Glukhov2016-11-271-3/+3
|
* Fixes #5057Yuriy Glukhov2016-11-261-12/+28
|
* Fixes #5035Felix Krause2016-11-181-10/+3
|
* Fixes #4974Felix Krause2016-10-311-9/+15
|
* fixes #4940andri lim2016-10-271-1/+1
|
* Fixes #4946Felix Krause2016-10-241-0/+1
|
* Table fixes. fixes #4901Felix Krause2016-10-231-4/+37
| | | | | | | | * added `==` for OrderedTable, CountTable and the *Ref types * added missing documentation to all `==` procs * fixed clear() for OrderedTables, which did not work because `var` does not work well with `|` * added tests
* fixes #4844Araq2016-10-081-1/+5
|
* fixes a critical tables bug that caused 'enlarge' to crash after 'add'Andreas Rumpf2016-09-051-3/+6
|
* Merge pull request #4367 from kierdavis/4365-tables-clearAndreas Rumpf2016-08-251-3/+3
|\ | | | | Improvements to tables.clear()
| * Add a fix for clear() on non-ref types by adding a missing 'var' annotation ↵Kier Davis2016-07-091-3/+3
| | | | | | | | | | | | | | | | to the type signature However, this fix won't take effect until a compiler bug (#4448) is fixed. Until then, the codebase functions identically to how it did before this commit (calls to clear() fail to compile for Table/OrderedTable/CountTable as the argument is immutable).
* | make nim bootstrap again for older versionsAndreas Rumpf2016-07-301-2/+2
| |
* | stdlib and compiler don't use .immediate anymoreAndreas Rumpf2016-07-291-8/+8
| |
* | Merge pull request #4463 from flyx/tables-equals-no-KeyErrorAndreas Rumpf2016-07-191-5/+4
|\ \ | | | | | | `==` in tables should not raise KeyError
| * | Use getOrDefault for tables.`==`Felix Krause2016-07-081-7/+5
| | |
| * | `==` in tables should not raise KeyErrorFelix Krause2016-07-071-2/+3
| |/ | | | | | | | | | | * With previous code, the compiler deduced that equalsImpl may raise a KeyError. While this could only actually happen in a nasty multi-threaded environment, I fixed the code so that it will never happen.
* | use table literal syntaxAxel Pahl2016-07-121-2/+2
| |
* | explain difference between Table and TableRef in tables.nimAxel Pahl2016-07-121-0/+33
|/
* Implement clear() for CountTableRef. Fixes #4325.Kier Davis2016-06-131-1/+1
|
* Implements tables.clear.Dominik Picheta2016-06-021-5/+29
|
* Introduce template withValue() for tables.nim too.cheatfate2016-05-271-0/+45
|
* Added del for OrderedTable and OrderedTableRefYuriy Glukhov2016-04-131-0/+41
|
* Fix CountTableRef#getOrDefaultSloane Simmons2016-01-091-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue with CountTableRef and getOrDefault: ```{nimrod} import tables proc main() = const testKey = "TESTKEY" let t: CountTableRef[string] = newCountTable[string]() # Before, does not compile with error message: #test_counttable.nim(7, 43) template/generic instantiation from here #lib/pure/collections/tables.nim(117, 21) template/generic instantiation from here #lib/pure/collections/tableimpl.nim(32, 27) Error: undeclared field: 'hcode' echo "Count of " & testKey & " is " & $t.getOrDefault(testKey) t.inc(testKey,3) echo "Count of " & testKey & " is " & $t.getOrDefault(testKey) when isMainModule: main() ``` Previously, `getOrDefault` for CountTableRef objects was calling the `getOrDefaultImpl` template, which used the t.data.hcode object - assuming a Table or similar object. Because CountTableRef didn't have an hcode in its data tuples, this wouldn't compile. Changed to be the same as `CountTable#getOrDefault`.
* udpated the compiler and tester to use getOrDefaultAraq2015-10-131-8/+10
|
* added getOrDefault; bootstrapping works againAraq2015-10-131-33/+38
|
* Merge branch 'mget' of https://github.com/def-/Nim into def--mgetAraq2015-10-131-33/+73
|\ | | | | | | | | | | | | | | | | | | Conflicts: lib/pure/collections/critbits.nim lib/pure/collections/tables.nim lib/pure/xmltree.nim lib/system/sets.nim tests/collections/ttables.nim tests/collections/ttablesref.nim
| * Rename mget to `[]`def2015-03-311-55/+83
| | | | | | | | | | | | | | | | | | - In sets, tables, strtabs, critbits, xmltree - This uses the new var parameter overloading - mget variants still exist, but are deprecated in favor of `[]` - Includes tests and fixed tests and usages of mget - The non-var `[]` now throws an exception instead of returning binary 0 or an empty string
* | breaking change: symbol lookups in generics follows spec more closely; fixes ↵Araq2015-08-071-4/+4
| | | | | | | | #2664
* | Merge branch 'more_concurrency' into develAraq2015-06-301-168/+49
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/tut1.txt lib/core/locks.nim lib/pure/collections/tables.nim lib/pure/selectors.nim