|
From: | address@hidden |
Subject: | Re: [lwip-devel] Extended udp_recv callback |
Date: | Tue, 13 Jan 2009 20:13:56 +0100 |
User-agent: | Thunderbird 2.0.0.19 (Macintosh/20081209) |
Alain M. wrote:
Maybe to support existing application without changes at the same time as new applications that use _ext? That flag check won't slow you down that much...Jakob Stoklund Olesen escreveu:I like this. Let me write a patch and get back to you. I will do something like this: #if UDP_EXTENDED_CALLBACK if (pcb->flags & UDP_FLAGS_EXTENDED_CALLBACK) { ((udp_extended_callback_function)pcb->recv)(pcb->recv_arg, pcb, p, &(iphdr->src), src, &(iphdr->dest), inp); } else #endif /* UDP_EXTENDED_CALLBACK */ { pcb->recv(pcb->recv_arg, pcb, p, &(iphdr->src), src); }I DON'T LIKE this at all. Why ad a runtime test when a compile time already exists? it will the code only this bit bigger
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |