EAPI void eina_array_step_set(Eina_Array *array,
unsigned int sizeof_eina_array,
unsigned int step) EINA_ARG_NONNULL(1);
-EAPI void eina_array_clean(Eina_Array *array) EINA_ARG_NONNULL(1);
+static inline void eina_array_clean(Eina_Array *array) EINA_ARG_NONNULL(1);
EAPI void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1);
EAPI Eina_Bool eina_array_remove(Eina_Array * array,
Eina_Bool (*keep)(void *data, void *gdata),
}
/**
+ * @brief Clean an array.
+ *
+ * @param array The array to clean.
+ *
+ * This function sets the count member of @p array to 0. For
+ * performance reasons, there is no check of @p array. If it is
+ * @c NULL or invalid, the program may crash.
+ */
+static inline void
+eina_array_clean(Eina_Array *array)
+{
+ array->count = 0;
+}
+
+/**
* @}
*/
--- /dev/null
+/* EINA - EFL data type library
+ * Copyright (C) 2010 Cedric Bail
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library;
+ * if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* This file is here to preserve ABI compatibility, don't touch
+ it unless you know what you are doing */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "eina_config.h"
+#include "eina_private.h"
+#include "eina_error.h"
+#include "eina_log.h"
+#include "eina_safety_checks.h"
+
+typedef struct _Eina_Array Eina_Array;
+struct _Eina_Array
+{
+#define EINA_ARRAY_VERSION 1
+ int version;
+
+ void **data;
+ unsigned int total;
+ unsigned int count;
+ unsigned int step;
+ EINA_MAGIC
+};
+
+EAPI void
+eina_array_clean(Eina_Array *array)
+{
+ EINA_SAFETY_ON_NULL_RETURN(array);
+
+ assert(array->version == EINA_ARRAY_VERSION);
+
+ array->count = 0;
+}
+
}
/**
- * @brief Clean an array.
- *
- * @param array The array to clean.
- *
- * This function sets the count member of @p array to 0. For
- * performance reasons, there is no check of @p array. If it is
- * @c NULL or invalid, the program may crash.
- */
-EAPI void
-eina_array_clean(Eina_Array *array)
-{
- EINA_SAFETY_ON_NULL_RETURN(array);
- EINA_MAGIC_CHECK_ARRAY(array);
-
- array->count = 0;
-}
-
-/**
* @brief Flush an array.
*
* @param array The array to flush.