eina: eina_array_free() now silently ignores NULL
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 15 Feb 2016 09:19:58 +0000 (18:19 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 17 Feb 2016 04:40:43 +0000 (13:40 +0900)
This is a follow-up patch after 56a4535ada71af1d22611e861ada.
Also, remove now invalid documentation.

src/lib/eina/eina_array.c
src/lib/eina/eina_array.h

index f500273..99891ad 100644 (file)
@@ -296,7 +296,6 @@ eina_array_free(Eina_Array *array)
    if (!array) return;
    eina_array_flush(array);
 
-   EINA_SAFETY_ON_NULL_RETURN(array);
    EINA_MAGIC_CHECK_ARRAY(array);
    MAGIC_FREE(array);
 }
index 07234cd..f4e363a 100644 (file)
@@ -264,10 +264,9 @@ EAPI Eina_Array *eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT EINA_
  * This function frees @p array. It calls first eina_array_flush() then
  * free the memory of the pointer. It does not free the memory
  * allocated for the elements of @p array. To free them, walk the array with
- * #EINA_ARRAY_ITER_NEXT. For performance reasons, there is no check
- * of @p array.
+ * #EINA_ARRAY_ITER_NEXT.
  */
-EAPI void        eina_array_free(Eina_Array *array) EINA_ARG_NONNULL(1);
+EAPI void        eina_array_free(Eina_Array *array);
 
 /**
  * @brief Set the step of an array.