Gentoo Archives: gentoo-guis

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-guis@l.g.o
Cc: lists@××××××.eu
Subject: Re: [gentoo-guis] Why I don't like catapult
Date: Wed, 02 Apr 2008 08:39:53
Message-Id: 20080402093943.6bebd816@snowcone
In Reply to: Re: [gentoo-guis] Why I don't like catapult by "René 'Necoro' Neumann"
On Tue, 01 Apr 2008 23:59:40 +0200
René 'Necoro' Neumann <lists@××××××.eu> wrote:
> Only one thing has to be solved: How is it possible to load additional > "catapult providers" on the fly? - So similar to the dbus way: You > install catapult and additional providers (e.g. catapult-portage) and > then load the correct libs at runtime. > I guess this can be answered by someone who has a deeper knowledge of > C than me ;)
Unix, rather than C... dlopen. If you're using C++, make provider an ABC and have a virtual ctor that dlopen()s .so files that export a function to make a concrete subclass. If you're using C, use a struct full of function pointers instead, and cry when you're forced to use 1970s style programming. Or use dlsym() a zillion times and cry even more... -- Ciaran McCreesh


File name MIME type
signature.asc application/pgp-signature