[patch] remove some exports from glib bindings

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] remove some exports from glib bindings

Colin Walters
Hi,

This patch makes various internal functions like dbus_gvalue_marshal not
be exported by prefixing them with "_".

I had to refactor the code a bit: created a dbus-gsignature.[ch] for the
binding tool to use, moved some tests around, and fixed a few includes.

Fairly straightforward Perl script otherwise, but if anyone spots
mistakes let me know, otherwise I'll add it in the next few days.


dbus-glib-unexport.patch (61K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] remove some exports from glib bindings

Havoc Pennington
Definitely a good idea. The dbus_g_init_internal() thing is pretty
suspect I think though. Just make any function that depends on
initialization call it automatically ... you can skip functions that
depend on other functions being called first, e.g. you would never need
to init in a method on an object since the new() will have been called
first and you could init there. So in practice usually you don't have to
call init() in that many places.

Havoc


--
dbus mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/dbus
Reply | Threaded
Open this post in threaded view
|

Re: [patch] remove some exports from glib bindings

Colin Walters
On Wed, 2005-08-03 at 23:39 -0400, Havoc Pennington wrote:
> Definitely a good idea. The dbus_g_init_internal() thing is pretty
> suspect I think though.

Well it was a bit complicated as the binding tool needed to initialize
some internal data structures to call some internal functions, but
doesn't call any of the "normal" entrypoint functions.  I managed to get
rid of dbus_g_init_internal with some restructuring though and committed
the patch.



--
dbus mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/dbus

signature.asc (196 bytes) Download Attachment