mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
[STDLIB] Add macro return types (#2487)
* add return types to macros where applicable * std::time::clock::now() -> clock::now()
This commit is contained in:
@@ -6,7 +6,7 @@ Sort list using the quick sort algorithm.
|
||||
@require @is_sortable(list) : "The list must be indexable and support .len or .len()"
|
||||
@require @is_valid_cmp_fn(cmp, list, context) : "Expected a comparison function which compares values"
|
||||
*>
|
||||
macro insertionsort(list, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @builtin @safemacro
|
||||
macro void insertionsort(list, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @builtin @safemacro
|
||||
{
|
||||
$if $kindof(list) == POINTER &&& ($kindof(*list) == ARRAY || $kindof(*list) == VECTOR):
|
||||
$typeof((*list)[0])[] list2 = list;
|
||||
|
||||
Reference in New Issue
Block a user