[Asterisk-code-review] vector: Add REMOVE, SORT, INSERT SORTED and RESET macros (asterisk[13])

Y Ateya asteriskteam at digium.com
Sun May 10 04:59:22 CDT 2015


Y Ateya has posted comments on this change.

Change subject: vector:  Add REMOVE, SORT, INSERT_SORTED and RESET macros
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.asterisk.org/#/c/421/3/include/asterisk/vector.h
File include/asterisk/vector.h:

Line 487: 	qsort((vec)->elems, (vec)->current, sizeof(*((vec)->elems)), comparison_fn)
> man page for qsort says that if comparison_fn returns 0 the order of those 
this is true; because qsort uses unstable sort algorithm. We can either modify it to be AST_VECTOR_QSORT (to be sure that qsort is visible in function name) OR use stable sort function like merge_sort (but it is not in normal standard library, it is in BSD library `libbsd`.).


-- 
To view, visit https://gerrit.asterisk.org/421
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41d32dbdf7137e0557134efeff9f9f1064b58d14
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Y Ateya <y.ateya at starkbits.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list