MEMPROXY_CLASS and virtual methods and cbdata class's

From: Robert Collins <robertc@dont-contact.us>
Date: Sat, 27 May 2006 23:04:57 +1000

saw this comment today..
 // reset should not reset the protocol; could have made protoPrefix a
 // virtual function instead, but it is not clear whether virtual
methods
 // are allowed with MEMPROXY_CLASS() and whether some cbdata void*
 // conversions are not going to kill virtual tables

virtual methods work file with MEMPROXY_CLASS.
casting to void * always gets the base address of the struct based on
the type that is being looked at AIUI.

I.e. if you have an HttpReply and cast to void * you might get a
different address than casting a HttpMsg to void * - but in practice
they are only ever different if there is multiple inheritance in place.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Received on Sat May 27 2006 - 07:05:34 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:04 MDT