Re: patch nag: refcount neon module

2006-09-18 Thread Alexander Larsson
On Fri, 2006-09-15 at 21:27 +0200, Christian Neumair wrote:
> Am Freitag, den 15.09.2006, 10:53 +0200 schrieb Alexander Larsson:
> 
> > Maybe we should instead
> > track the methods loaded by module name instead of method name? That way
> > it would automatically work. (And we won't be opening a GModule twice.)
> 
> I think changing the way modules are initialized/shutdown is not really
> an option at this stage of platform maturity. Yeah, this particular bit
> of the API might not have been used very often, but maybe some modules
> out there rely on being initialized for all their methods, possibly for
> initializing extra libraries on the fly.

I guess. Its what should have been done initially though...

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander LarssonRed Hat, Inc 
   [EMAIL PROTECTED][EMAIL PROTECTED] 
He's a jaded native American gentleman spy who hides his scarred face behind a 
mask. She's a bloodthirsty goth single mother descended from a line of 
powerful witches. They fight crime! 

___
gnome-vfs-list mailing list
gnome-vfs-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list


Re: patch nag: refcount neon module

2006-09-15 Thread Christian Neumair
Am Freitag, den 15.09.2006, 10:53 +0200 schrieb Alexander Larsson:
> On Fri, 2006-09-15 at 10:46 +0200, Alexander Larsson wrote:
> > On Thu, 2006-09-14 at 21:48 +0200, Christian Neumair wrote:
> > > Handling multiple methods in one module requires refcounting, which
> > > currently isn't implemented properly for the neon method.
> > > http://bugzilla.gnome.org/show_bug.cgi?id=347470 provides a patch.
> > 
> > Looks good. Please commit.
> 
> Actually, this would be needed for other methods with aliases, like sftp
> (also known as ssh) and gzip (also gunzip).

Hrm the gzip/gunzip doesn't do anything in init/shutdown ATM, for sftp
this could indeed be useful, but the connection hash table is declared
never destroyed, and usually all methods/modules are shut-down at once.


> Maybe we should instead
> track the methods loaded by module name instead of method name? That way
> it would automatically work. (And we won't be opening a GModule twice.)

I think changing the way modules are initialized/shutdown is not really
an option at this stage of platform maturity. Yeah, this particular bit
of the API might not have been used very often, but maybe some modules
out there rely on being initialized for all their methods, possibly for
initializing extra libraries on the fly.

-- 
Christian Neumair <[EMAIL PROTECTED]>

___
gnome-vfs-list mailing list
gnome-vfs-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list


Re: patch nag: refcount neon module

2006-09-15 Thread Alexander Larsson
On Fri, 2006-09-15 at 10:46 +0200, Alexander Larsson wrote:
> On Thu, 2006-09-14 at 21:48 +0200, Christian Neumair wrote:
> > Handling multiple methods in one module requires refcounting, which
> > currently isn't implemented properly for the neon method.
> > http://bugzilla.gnome.org/show_bug.cgi?id=347470 provides a patch.
> 
> Looks good. Please commit.

Actually, this would be needed for other methods with aliases, like sftp
(also known as ssh) and gzip (also gunzip). Maybe we should instead
track the methods loaded by module name instead of method name? That way
it would automatically work. (And we won't be opening a GModule twice.)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander LarssonRed Hat, Inc 
   [EMAIL PROTECTED][EMAIL PROTECTED] 
He's an immortal misogynist gentleman spy possessed of the uncanny powers of 
an insect. She's a blind extravagent fairy princess with a knack for trouble. 
They fight crime! 

___
gnome-vfs-list mailing list
gnome-vfs-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list


Re: patch nag: refcount neon module

2006-09-15 Thread Alexander Larsson
On Thu, 2006-09-14 at 21:48 +0200, Christian Neumair wrote:
> Handling multiple methods in one module requires refcounting, which
> currently isn't implemented properly for the neon method.
> http://bugzilla.gnome.org/show_bug.cgi?id=347470 provides a patch.

Looks good. Please commit.

> Sidenote: We never g_module_close the modules opened for one
> MethodElement. Since GModules are refcounted, we should be able to
> safely close them in module_element_free, even when used with multiple
> methods.

This is dangerous, as things might still somehow reference code or data
in those .so files. At the very least we shouldn't do anything like this
in the stable series.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander LarssonRed Hat, Inc 
   [EMAIL PROTECTED][EMAIL PROTECTED] 
He's a superhumanly strong coffee-fuelled matador haunted by an iconic dead 
American confidante She's a cold-hearted mutant archaeologist who believes she 
is the reincarnation of an ancient Egyptian queen. They fight crime! 

___
gnome-vfs-list mailing list
gnome-vfs-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list


patch nag: refcount neon module

2006-09-14 Thread Christian Neumair
Handling multiple methods in one module requires refcounting, which
currently isn't implemented properly for the neon method.
http://bugzilla.gnome.org/show_bug.cgi?id=347470 provides a patch.

Sidenote: We never g_module_close the modules opened for one
MethodElement. Since GModules are refcounted, we should be able to
safely close them in module_element_free, even when used with multiple
methods.

-- 
Christian Neumair <[EMAIL PROTECTED]>

___
gnome-vfs-list mailing list
gnome-vfs-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list