diff options
Diffstat (limited to 'src/stdlib/lists.h')
| -rw-r--r-- | src/stdlib/lists.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/lists.h b/src/stdlib/lists.h index 9ac8bf1b..f6d971f2 100644 --- a/src/stdlib/lists.h +++ b/src/stdlib/lists.h @@ -119,7 +119,7 @@ void List$remove_item(List_t *list, void *item, Int_t max_removals, const TypeIn : none_expr; \ }) -OptionalInt_t List$find(List_t list, void *item, const TypeInfo_t *type); +PUREFUNC OptionalInt_t List$find(List_t list, void *item, const TypeInfo_t *type); #define List$find_value(list, item_expr, type) \ ({ \ __typeof(item_expr) item = item_expr; \ @@ -134,7 +134,7 @@ void *List$random(List_t list, OptionalClosure_t random_int64); #define List$random_value(list, random_int64, t) \ ({ \ List_t _list_expr = list; \ - if (_list_expr.length == 0) fail("Cannot get a random value from an empty list!"); \ + if (_list_expr.length == 0) fail_text(Text("Cannot get a random value from an empty list!")); \ *(t *)List$random(_list_expr, random_int64); \ }) List_t List$sample(List_t list, Int_t n, List_t weights, Closure_t random_num, int64_t padded_item_size); |
