[Gtk-sharp-list] Pre-release, Gtk# 0.6

Rachel Hestilow hestilow@ximian.com
09 Dec 2002 23:52:42 -0600


--=-X2ty3Am8f9Z8pldmYPmg
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, 2002-12-09 at 23:00, Gonzalo Paniagua Javier wrote:
> Should i commit the Log.cs file (wraps logging functions and can make
> life easier when debugging warning/error/critical from C libraries)? (i
> sent it a week ago or so)
>=20

I see Mike has already approved it, but I have some additional
comments/recommendations:

* IntPtr data isn't generally useful for .NET delegates, because
delegates support closures automatically for instance methods. I would
suggest you remove the user_data parameter in the methods, and just pass
in IntPtr.Zero. Even better would be to map between a .NET delegate and
a native-type delegate. The generator currently does this for the
various callback funcs, it would be easy to copy what it does.

* Delegate function pointers are only pinned for the duration of a
PInvoke call. If you are setting a handler, you need to keep the GC from
getting at the delegate you passed to C. The current solution used by
the generator is explicitly keeping a reference in a static hash table.
It's suboptimal, but works well enough for now.

-- Rachel




--=-X2ty3Am8f9Z8pldmYPmg
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA99YEqapOJdUj74F4RAmmdAKDN/yfyNN71gcihDif/dEBZt64/9gCfRvIt
V/Y7vAqZ5EE1M3WJEgo/6KM=
=gT+c
-----END PGP SIGNATURE-----

--=-X2ty3Am8f9Z8pldmYPmg--