Dodgy function pointer casts

Ben Hutchings <ben-/[email protected]>
Newsgroups gmane.comp.window-managers.ion.general
Message-ID <[email protected]>
When checking over the Debian package of mod_xinerama, I noticed that
the code was casting a pointer to a callback function because the
function's argument types didn't quite match those expected for the
callback.  When I objected to this, the package's maintainer pointed out
that there were similar casts throughout Ion3, which is indeed true.
While this obviously works on most platforms, calling through a function
pointer that doesn't match the type of the function it points to has
undefined behaviour.  I would like to clear this up by adding wrapper
functions and changing function parameter types so that only data
pointer casts are needed.

Is this change likely to be acceptable, Tuomo?

Ben.

-- 
Ben Hutchings
All extremists should be taken out and shot.
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD4DBQBGL9ux79ZNCRIGYgcRAl5vAJY5fm+rF4Yc/JYHwtyBva27BhnCAKDaryUG
HT3YRcNrYJmbH4XxUc1osA==
=4guZ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.