array: return_if_fail() if element size is 0
authorBenjamin Otte <otte@redhat.com>
Sat, 14 Jan 2012 00:13:42 +0000 (01:13 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 14 Jan 2012 00:15:16 +0000 (01:15 +0100)
commita6e149e41f359c4bf2ddab341dad20e7fb2bd9f3
treed81fb8d1351f418cbc0ed937a710652c327e2363
parent9d52243790aa460c228bdcf7ee8e28f78ecd7b13
array: return_if_fail() if element size is 0

This is particular useful for:
  g_array_new (sizeof (MyStruct), FALSE, FALSE);
because the correct incantation is
  g_array_new (FALSE, FALSE, sizeof (MyStruct));
and these warnings will trigger in the first situation.
glib/garray.c