From f38b0336c6dee6039957f4780391dd9ddf429e06 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 14 Oct 2021 17:18:06 -0700 Subject: [PATCH] update legacy 'qsort_r' comment MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The problem of “call `qsort` but also access some external context” is still relevant, but this functionality has been standardized into `qsort_s` in C11, not `qsort_r`. --- lib/neatogen/delaunay.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/neatogen/delaunay.c b/lib/neatogen/delaunay.c index 61f8ea6c3..6f13c6b33 100644 --- a/lib/neatogen/delaunay.c +++ b/lib/neatogen/delaunay.c @@ -303,9 +303,8 @@ static void addEdge (GtsSegment * e, estate* es) es->n += 1; } -/* If qsort_r ever becomes standardized, this should be used - * instead of having a global variable. - */ +// when moving to C11, qsort_s should be used instead of having a global +// variable static double* _vals; typedef int (*qsort_cmpf) (const void *, const void *); -- 2.40.0