When defining a callback proc in Xt (for example XtTimerCallbackProc), client_data is specified as an XtPointer. Is it safe to pass an int via client_data, rather than an actual pointer, and cast it back inside the procedure?
For example:
void foo(void) {
...
int data = 1;
XtAppAddTimeout(app_context, 1000, timer_cb, data);
...
}
void timer_cb(XtPointer client_data, XtIntervalId *timer)
{
int my_data = (int) client_data;
...
}