| 558 | } |
| 559 | |
| 560 | static dict *_list2dict |
| 561 | ( |
| 562 | SIValue list |
| 563 | ) { |
| 564 | uint32_t n = SIArray_Length(list); |
| 565 | dict *values = HashTableCreate(&def_dt); |
| 566 | for(uint i = 0; i < n; i++) { |
| 567 | SIValue val = SIArray_Get(list, i); |
| 568 | XXH64_state_t state; |
| 569 | XXH_errorcode res = XXH64_reset(&state, 0); |
| 570 | ASSERT(res != XXH_ERROR); |
| 571 | |
| 572 | SIValue_HashUpdate(val, &state); |
| 573 | |
| 574 | // finalize the hash |
| 575 | XXH64_hash_t hash = XXH64_digest(&state); |
| 576 | dictEntry *existing; |
| 577 | dictEntry *entry = HashTableAddRaw(values, (void *)hash, &existing); |
| 578 | } |
| 579 | |
| 580 | return values; |
| 581 | } |
| 582 | |
| 583 | // concatenate lists starting at specified position |
| 584 | // list.insertListElements(list, list2, idx, dups = TRUE) -> list |
no test coverage detected