Re: Build Errors: calitko-0.6.1

Hi Peter,

Just fixed the problem in SocketAllocator - simply replaced the cast to an int with a cast to QObject * (that’s what SignalMapper supports) - all pointers do have the same size :-).

I haven’t study the SocketAllocator implementation so I don’t know why there are reinterpret_casts needed, but I just wanted to write a note about pointer sizes.

There are some peculiarities about pointer sizes:

  • The size of a pointer is platform dependant.
  • Even pointers of different types may not be the same size as each other (details 1, 2).
  • Pointers to members may have different size than “ordinary” pointers - they’re mostly implemented as simple structs (details).
  • Pointers to functions may have different size than void * (details - book, see rule n.91).

I’m sorry that I have no direct links to the C++ standard [draft], but I hope that what I’ve written is correct.

Have a nice day,

Petr

Would you like to post a relpy?


This post is a reply to:
Re: Build Errors: calitko-0.6.1
Hi Giles, Just fixed the problem in SocketAllocator - simply replaced the cast to an int with a cast to QObject * (that's what SignalMapper supports) - all pointers do have (more...)

No follow-ups yet.