/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "portable.h" /* SIZEOF_MAX */
#include "xbt/misc.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/dynar.h"
#include <sys/types.h>
-
+#include "xbt/dynar_private.h" /* type definition, which we share with the
+ code in charge of sending this across the net */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(dynar,xbt,"Dynamic arrays");
-typedef struct xbt_dynar_s {
- unsigned long size;
- unsigned long used;
- unsigned long elmsize;
- void *data;
- void_f_pvoid_t *free_f;
-} s_xbt_dynar_t;
#define __sanity_check_dynar(dynar) \
xbt_assert0(dynar, \
__sanity_check_dynar(dynar);
{
- char elm[64];
+ char elm[SIZEOF_MAX];
const unsigned long used = dynar->used;
unsigned long i = 0;