Re: How to use Quarks?

2009-01-04 Thread Stefan Kost
hi, Patrick Braga wrote: > I've just begun learning GLib, and I came across Quarks. The > documentation describes them as "association between strings and integer > identifiers. Given either the stringo or the GQuark identifier it is > possible to retrieve the other." > > This seems really useful

Re: struggling with the non-recursive gdk_threads_enter

2009-01-04 Thread Nikolaj Thygesen
Alexander Larsson wrote: On Tue, 2008-12-30 at 21:47 -0500, Yu Feng wrote: Dear Devels: I am having troubles because the GMutex used gdk_threads_enter/leave can be non-recursive. IMHO that is a Gtk+ bug. When loading the modules from GTK_MODULE it should take the Gdk lock in order to

Re: struggling with the non-recursive gdk_threads_enter

2009-01-04 Thread Alexander Larsson
On Tue, 2008-12-30 at 21:47 -0500, Yu Feng wrote: > Dear Devels: > > I am having troubles because the GMutex used gdk_threads_enter/leave can > be non-recursive. > > I have a piece of code (g_module_check_init) to either be called from an > event dispatched by GDK(if the module is loaded via GtkS

Re: struggling with the non-recursive gdk_threads_enter

2009-01-04 Thread Yu Feng
Hi Friends, Thanks for the hint. I don't have the luxury to override the gdk locking functions since I am writing a plugin module for arbitrary applications; the application may also want to override the locking functions. This is the solution I came up with: in gtk_module_init, I defer the libr

Re: struggling with the non-recursive gdk_threads_enter

2009-01-04 Thread Matthias Clasen
On Sun, Jan 4, 2009 at 5:14 AM, Alexander Larsson wrote: > IMHO that is a Gtk+ bug. I agree. Yu, can you file a bug about this ? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: struggling with the non-recursive gdk_threads_enter

2009-01-04 Thread Yu Feng
On Sun, 2009-01-04 at 15:43 -0500, Matthias Clasen wrote: > On Sun, Jan 4, 2009 at 5:14 AM, Alexander Larsson wrote: > > > IMHO that is a Gtk+ bug. > > I agree. Yu, can you file a bug about this ? Yes. Filed as Bug 566578 Yu ___ gtk-app-devel-list m

Re: How to use Quarks?

2009-01-04 Thread Andrew Cowie
On Sat, 2009-01-03 at 10:40 -0500, Yu Feng wrote: > If you are accessing data member(g_object_set_data) frequently you could > use quarks to accelerate the looking up process(g_object_set_qdata). On Sun, 2009-01-04 at 14:41 +0200, Stefan Kost wrote: > If you use a hashtable with strings as keys, a