Snapshot uploaded.

TODO: If we ever have a second use of pointer-to-member, this should be moved to
common code and changed to IsPointerToMemberValid().

========================================================================
http://mondrian.corp.google.com/file/8972115///depot/googleclient/gears/opensource/gears/base/common/dispatcher.h?a=1
File //depot/googleclient/gears/opensource/gears/base/common/dispatcher.h 
(snapshot 1)
------------------------------------
Line 79: // platform uses thunks and a single word for the pointer.
On Wed Nov 12 16:18:01 2008 PST, nigeltao wrote:
> Can you add a comment that on a typical architecture (e.g. x86 ??) then this
> collapses to simply checking if callback is not NULL. It might also help to
> mention "for example, Android (and specifically, the ARM EABI)" earlier in
this
> comment block (maybe just after "on some architectures"), not just in the CL
> description.

I've rewritten the comment to make it clearer what the exact issue is, and that
in the case of x86 and other architectures which employ thunks, this is just a
comparison to NULL.

I've also added a comparison of sizeof(ImplCallback) to sizeof(void *) to make
it clear that the compiler will inline the whole thing away if it's just a plain
pointer.
========================================================================

-- 
To respond, reply to this email or visit http://mondrian.corp.google.com/8972115

Reply via email to