fixes that cx_list_default_insert_array() has the wrong nonnull attribute when used for cxListEmplaceArray() default tip

Tue, 23 Dec 2025 17:08:14 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 23 Dec 2025 17:08:14 +0100
changeset 1662
527ac061b247
parent 1661
a389bf17eaaa

fixes that cx_list_default_insert_array() has the wrong nonnull attribute when used for cxListEmplaceArray()

fixes #790

CHANGELOG file | annotate | diff | comparison | revisions
docs/Writerside/topics/about.md file | annotate | diff | comparison | revisions
src/cx/list.h file | annotate | diff | comparison | revisions
--- a/CHANGELOG	Tue Dec 23 14:31:56 2025 +0100
+++ b/CHANGELOG	Tue Dec 23 17:08:14 2025 +0100
@@ -37,6 +37,7 @@
  * fixes that overwriting items with cxMapPut() in a kv-list did not work
  * fixes that cxReallocate(), cxReallocateArray(), cx_reallocate(), and cx_reallocatearray()
    were not returning zero after freeing the memory when passed a size of zero
+ * fixes that cx_list_default_insert_array() has the wrong nonnull attribute when used for cxListEmplaceArray()
  * removes the CX_STR() macro and instead makes the cx_str() inlinable
  * removes the sort_members feature from CxJsonWriter
  * removes the source and sink API from properties.h
--- a/docs/Writerside/topics/about.md	Tue Dec 23 14:31:56 2025 +0100
+++ b/docs/Writerside/topics/about.md	Tue Dec 23 17:08:14 2025 +0100
@@ -64,6 +64,7 @@
 * fixes that overwriting items with cxMapPut() in a kv-list did not work
 * fixes that cxReallocate(), cxReallocateArray(), cx_reallocate(), and cx_reallocatearray()
   were not returning zero after freeing the memory when passed a size of zero
+* fixes that cx_list_default_insert_array() has the wrong nonnull attribute when used for cxListEmplaceArray()
 * removes the CX_STR() macro and instead makes the cx_str() inlinable
 * removes the sort_members feature from CxJsonWriter
 * removes the source and sink API from properties.h
--- a/src/cx/list.h	Tue Dec 23 14:31:56 2025 +0100
+++ b/src/cx/list.h	Tue Dec 23 17:08:14 2025 +0100
@@ -206,7 +206,7 @@
  * @param n the number of elements to insert
  * @return the number of elements actually inserted
  */
-cx_attr_nonnull
+cx_attr_nonnull_arg(1)
 CX_EXPORT size_t cx_list_default_insert_array(struct cx_list_s *list,
         size_t index, const void *data, size_t n);
 

mercurial