ucx/compare.c

branch
ucx-3.1
changeset 816
839fefbdedc7
parent 747
efbd59642577
--- a/ucx/compare.c	Sat Apr 20 13:01:58 2024 +0200
+++ b/ucx/compare.c	Thu May 23 22:35:45 2024 +0200
@@ -199,3 +199,15 @@
     }
 }
 
+int cx_cmp_ptr(
+        void const *ptr1,
+        void const *ptr2
+) {
+    uintptr_t p1 = (uintptr_t) ptr1;
+    uintptr_t p2 = (uintptr_t) ptr2;
+    if (p1 == p2) {
+        return 0;
+    } else {
+        return p1 < p2 ? -1 : 1;
+    }
+}

mercurial