g_memdup has an inconsistent interface, should be replaced or deprecated
Submitted by Diego Elio Pettenò
Link to original bug (#557665)
Description
The g_memdup() function as of now has an interface that makes it inconsistent with most of the other functions; instead of a gsize parameter for the size of the memory area to dupe, it uses a guint parameter; the problem here is that guint might be smaller than gsize, and could cause problem if g_memdup() is expected to bear an interface comparable with g_strndup(), that instead has a gsize parameter.
Since changing the parameter type would mean breaking the ABI, either it should be versioned or the function should be deprecated for a replacement, for this to be consistent.
Thanks, Diego
Version: 2.18.x