more custom data for array re-allocator

Sun, 13 Nov 2022 13:29:15 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 13 Nov 2022 13:29:15 +0100
changeset 609
6ae8146d9f62
parent 608
2e93521145ac
child 610
de5d3ee6435f

more custom data for array re-allocator

src/cx/array_list.h file | annotate | diff | comparison | revisions
--- a/src/cx/array_list.h	Sun Nov 13 13:22:03 2022 +0100
+++ b/src/cx/array_list.h	Sun Nov 13 13:29:15 2022 +0100
@@ -60,20 +60,32 @@
      * @param array the array to reallocate
      * @param capacity the new capacity (number of elements)
      * @param elem_size the size of each element
-     * @param data additional data
+     * @param alloc a reference to this allocator
      * @return a pointer to the reallocated memory or \c NULL on failure
      */
     void *(*realloc)(
             void *array,
             size_t capacity,
             size_t elem_size,
-            void *data
+            struct cx_array_reallocator_s *alloc
     );
 
     /**
-     * Additional data.
+     * Custom data pointer.
+     */
+    void *ptr1;
+    /**
+     * Custom data pointer.
      */
-    void *data;
+    void *ptr2;
+    /**
+     * Custom data integer.
+     */
+    size_t int1;
+    /**
+     * Custom data integer.
+     */
+    size_t int2;
 };
 
 /**

mercurial