Merge branch 'devel' of https://github.com/Araq/Nim into devel

This commit is contained in:
Araq 2015-02-16 02:56:50 +01:00
commit c11fa7942e
33 changed files with 211 additions and 256 deletions

View file

@ -47,7 +47,7 @@ block tableTest1:
for y in 0..1:
assert t[(x,y)] == $x & $y
assert($t ==
"{(x: 0, y: 0): 00, (x: 0, y: 1): 01, (x: 1, y: 0): 10, (x: 1, y: 1): 11}")
"{(x: 0, y: 1): 01, (x: 0, y: 0): 00, (x: 1, y: 0): 10, (x: 1, y: 1): 11}")
block tableTest2:
var t = initTable[string, float]()

View file

@ -302,7 +302,7 @@ template build_specification_lookup():
## Returns the table used to keep pointers to all of the specifications.
var result {.gensym.}: OrderedTable[string, ptr Tparameter_specification]
result = initOrderedTable[string, ptr Tparameter_specification](
nextPowerOfTwo(expected.len))
tables.rightSize(expected.len))
for i in 0..expected.len-1:
for param_to_detect in expected[i].names:
if result.hasKey(param_to_detect):