I am trying to migrate Tq library (Qt 4.15 and current release of tcl) (Thanks to Harri Porten and Frologic that they provided the source code)
But I stuck with the problem,
Call to Tcl_CreateEventSource crushes due to null pointer , which looking at the source is related to ThreadSpecificData *tsdPtr initialization
void
Tcl_CreateEventSource(
Tcl_EventSetupProc *setupProc,
/* Function to invoke to figure out what to
* wait for. */
Tcl_EventCheckProc *checkProc,
/* Function to call after waiting to see what
* happened. */
ClientData clientData) /* One-word argument to pass to setupProc and
* checkProc. */
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
EventSource *sourcePtr = ckalloc(sizeof(EventSource));
sourcePtr->setupProc = setupProc;
sourcePtr->checkProc = checkProc;
sourcePtr->clientData = clientData;
sourcePtr->nextPtr = tsdPtr->firstEventSourcePtr; tsdPtr->firstEventSourcePtr = sourcePtr;
}
Could anybody point what should I do to fix the problem?
Best regards,
Alex
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 25:08:33 |
Calls: | 6,448 |
Files: | 12,050 |
Messages: | 5,254,328 |