Thx for your answer.
Indeed I was wrong on the stack @, but according to glib doc
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
It's just a cast to a gpointer. Here we use a pointer storage, to store
an uint, implying size(gpointer) always >= size(gulong) ?
Am I wrong ? Is it really safe ?
Le 14/10/2016 à 11:28, Patrik Flykt a écrit :
On Wed, 2016-10-12 at 18:41 +0200, Antoine Aubert wrote:
> timeout_id = g_timeout_add_seconds(timeout, send_timeout,
> - GUINT_TO_POINTER(timeout));
The GUINT_TO_POINTER() writes the value of 'timeout' into the user data
pointer variable; it does not reference the address of the stack