src/cx/allocator.h

branch
docs/3.1
changeset 1169
6a33a5648027
parent 1134
60edcd57d54c
--- a/src/cx/allocator.h	Fri Feb 07 17:55:28 2025 +0100
+++ b/src/cx/allocator.h	Sat Feb 08 14:13:59 2025 +0100
@@ -65,8 +65,8 @@
      */
     void *(*calloc)(
             void *data,
-            size_t nelem,
-            size_t n
+            size_t nmemb,
+            size_t size
     );
 
     /**
@@ -386,11 +386,11 @@
         cxReallocateArray_(allocator, (void**) (mem), nmemb, size)
 
 /**
- * Allocate @p nelem elements of @p n bytes each, all initialized to zero.
+ * Allocate @p nmemb elements of @p n bytes each, all initialized to zero.
  *
  * @param allocator the allocator
- * @param nelem the number of elements
- * @param n the size of each element in bytes
+ * @param nmemb the number of elements
+ * @param size the size of each element in bytes
  * @return a pointer to the allocated memory
  */
 cx_attr_nonnull_arg(1)
@@ -400,8 +400,8 @@
 cx_attr_allocsize(2, 3)
 void *cxCalloc(
         const CxAllocator *allocator,
-        size_t nelem,
-        size_t n
+        size_t nmemb,
+        size_t size
 );
 
 #ifdef __cplusplus

mercurial