On Sat, Jan 10, 2015 at 07:38:03AM -0500, Jeff Trawick wrote: > On Fri, Jan 9, 2015 at 3:48 PM, Jeff Trawick <[email protected]> wrote: > > * Add helper functions to allocate a request_rec, conn_rec, server_rec. > > It doesn't solve all possible problems of course but can drastically reduce > > the frequency of needing to recompile a module that needs to do such things. > > Actually, ap_{request_rec|conn_rec|server_rec}_size would be much better; > that supports allocation, copy, as well as "Pfft! You better recompile me."
I think one of these solutions is probably necessary, but I'm not sure which. 1) Only exporting the struct sizes means httpd cannot initialize the structs, which is both a problem in general for extending structs and specifically for this case (per my other mail). 2) Only exporting the struct sizes means we don't have to invent a new API and decide what "initialize a request_rec (etc)" really means and add new API/ABI guarantees there which we might screw up later. 3) We could have a stricter API rule which says "you can extend request_rec (etc), but assume third-party modules might initialize the the fields to zero." This kind of guarantee might be a tough commitment. It's definitely a "don't start from here" problem. Regards, Joe
