I have a weird problem with a pointer parameter:
cmdQueuePull(ascii *cmd, viewHdlr view, dictionary_t *viewData); // Inside some function i have this: dictionary_t * viewData = NULL; // Here viewData points to NULL cmdQueuePull(cmd, view, viewData); // While inside this function, which updates the // viewData pointer, the pointer is NOT NULL // and correctly points to the location of viewData. // Here it yet again points to NULL
When i enter the cmdQueuePull function and update the viewData pointer to point to a dictionary, then it works fine… Until it exits the cmdQueuePull function. After that, the pointer is back to its initial NULL state!
The viewData is not created inside the cmdQueuePull, it is created in another function with adl_memGet().
EDIT: I now know why this won’t work; because the adress of the dictionary is passed by value, so i cannot change this from inside the function