title: Passing values to g_timeout_add_seconds() not working?
body: <p>I'm trying to pass a value into a function used in g_timeout_add_seconds(), but it's not working as expected.  It works when I pass a value into the function normally.  Am I using g_timeout_add_seconds() incorrectly?</p>
  
  <pre><code>typedef struct { int x, y; } xy_t;
  
  void fn_init(void)
  {
    xy_t  xy;
    int    z;
  
    xy.x =  12;
    xy.y =  23;
    z    = 123;
    pass_thru_test1(&amp;xy);
    pass_thru_test2(&amp;xy);
    pass_thru_test3(&amp;z);
  
    z = 234;
    g_timeout_add_seconds(1, pass_thru_test3, &amp;z);
  }
  
  gboolean pass_thru_test1(xy_t *data)
  {
    xy_t *point = (xy_t *)data;
    printf("Pass Thru Test 1: x:%d, y:%d\n", point-&gt;x, point-&gt;y);
    return TRUE;
  }
  
  gboolean pass_thru_test2(gpointer data)
  {
    xy_t *p = (xy_t *)data;
    printf("Pass Thru Test 2: x:%d, y:%d\n", p-&gt;x, p-&gt;y);
    return TRUE;
  }
  
  gboolean pass_thru_test3(gpointer data)
  {
    int *point = (int *)data;
    printf("Pass Thru Test 3: %d\n", *p);
    return TRUE;
  }
  </code></pre>
  
  <p>the results are:
  </p>
  
  <pre class="lang-none prettyprint-override"><code>Pass Thru Test 1: x:12, y:23
  Pass Thru Test 2: x:12, y:23
  Pass Thru Test 3: 123
  Pass Thru Test 3: 724126128
  Pass Thru Test 3: 724126128
  Pass Thru Test 3: 724126128
  </code></pre>