8 Mar
2012
8 Mar
'12
5:24 a.m.
I am having difficulties understanding the code that handles the LogQueueFifo objects. For instance static void log_queue_fifo_push_head(LogQueue *s, LogMessage *msg, const LogPathOptions *path_options) { LogQueueFifo *self = (LogQueueFifo *) s; LogMessageQueueNode *node; ... I don't understand how a LogQueue* can be passed in, and then cast to a LogQueueFifo* when the structs are not the same. Then fields in the LogQueueFifo* are referenced but they won't have any meaning because the LogQueue* didn't have the same data at the same location. I am a little rusty in C, so can someone explain this to me please? Evan.