title: Passing variables through callback function in GTK C
body: <p>I'm trying to print the value of the variable <code>i</code> on the console from my callback
  functon, but instead of printing 23 it keeps printing some address 11652528 etc...</p>
  
  <p>I've been searching quite a lot on the net and according to an old GTK tutorial (where the actual <code>G_CALLBACK</code> Macro was <code>GTK_SIGNAL_FUNC</code>) this should work.</p>
  
  <p>Does anyone have an idea where the error is??</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;gtk/gtk.h&gt;
  #include &lt;string.h&gt;
  
  void f_window(GtkWidget* widget, gpointer data)
  {
      g_print("%d\n",GPOINTER_TO_INT(data));
  }
  int main(int argc, char **argv)
  {
      gint i=23;
  
      GtkWidget * MainWindow = NULL;
  
      gtk_init(&amp;argc, &amp;argv);
  
      MainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  
      g_signal_connect(G_OBJECT(MainWindow),"delete-event",G_CALLBACK(f_window),GINT_TO_POINTER(i));
  
      gtk_widget_show_all(MainWindow);
      gtk_main();
  
  
      gtk_exit(EXIT_SUCCESS);
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>thank you in advance!!!</p>