This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] manual: Correct guarantee about pointers compared by qsort()


On 12/11/2014 10:57 AM, Anders Kaseorg wrote:
+Although the object addresses passed to the comparison function lie
+within the array, they need not correspond with the original locations
+of those objects, because the sorting algorithm may swap around

No comma before âbecauseâ.

+objects in the array before making some comparisons.  The only way to
+perform a stable sort with @var{qsort} is to first augment the objects
+with a monotonic counter of some kind.

â@code{qsort}â instead of â@var{qsort}â.

Otherwise looks fine.

--
Florian Weimer / Red Hat Product Security


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]