src/mempool.c

changeset 962
cd418898af5c
parent 947
2a47b4a5c216
--- a/src/mempool.c	Thu Oct 31 14:39:05 2024 +0100
+++ b/src/mempool.c	Thu Oct 31 14:54:44 2024 +0100
@@ -97,7 +97,7 @@
         return NULL;
     }
     if (mem != newm) {
-        cx_for_n(i, pool->size) {
+        for (size_t i = 0; i < pool->size; i++) {
             if (pool->data[i] == mem) {
                 pool->data[i] = newm;
                 return ((char*)newm) + sizeof(cx_destructor_func);
@@ -119,7 +119,7 @@
     struct cx_mempool_memory_s *mem = (struct cx_mempool_memory_s *)
             ((char *) ptr - sizeof(cx_destructor_func));
 
-    cx_for_n(i, pool->size) {
+    for (size_t i = 0; i < pool->size; i++) {
         if (mem == pool->data[i]) {
             if (mem->destructor) {
                 mem->destructor(mem->c);
@@ -139,7 +139,7 @@
 
 void cxMempoolDestroy(CxMempool *pool) {
     struct cx_mempool_memory_s *mem;
-    cx_for_n(i, pool->size) {
+    for (size_t i = 0; i < pool->size; i++) {
         mem = pool->data[i];
         if (mem->destructor) {
             mem->destructor(mem->c);

mercurial