In some versions of some OSes, even <string.h> declares index() under

some circumstances.  Use array_index as a variable name instead, to
avoid warnings.

svn path=/trunk/; revision=50404
This commit is contained in:
Guy Harris 2013-07-06 08:33:07 +00:00
parent 3376be17a7
commit 24142c4ee4
2 changed files with 4 additions and 4 deletions

View File

@ -111,10 +111,10 @@ wmem_array_append(wmem_array_t *array, const void *in, guint count)
}
void *
wmem_array_index(wmem_array_t *array, guint index)
wmem_array_index(wmem_array_t *array, guint array_index)
{
g_assert(index < array->elem_count);
return &array->buf[index * array->elem_size];
g_assert(array_index < array->elem_count);
return &array->buf[array_index * array->elem_size];
}
void *

View File

@ -68,7 +68,7 @@ wmem_array_append(wmem_array_t *array, const void *in, guint count);
WS_DLL_PUBLIC
void *
wmem_array_index(wmem_array_t *array, guint index);
wmem_array_index(wmem_array_t *array, guint array_index);
WS_DLL_PUBLIC
void *