[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: klibfactory cleanup
From:       Michael Matz <matz () kde ! org>
Date:       2001-09-23 19:05:32
[Download RAW message or body]

Hi,

On Sun, 23 Sep 2001, Simon Hausmann wrote:
> Also I'm thinking about defining a macro like
>
> #define KDE_EXPORT_COMPONENT_FACTORY( factory ) \
>     extern "C" { void *kde_initFactory() { return new factory; } }
>
> to hide a bit of the uglyness :)

Whatever is done, those external entry points from above should be named
according to the library they are in.  Or named by some other mean, which
makes sure there are no two entry points named the same in the same
process.  (reason: getting a named entry in a DSO, even if one knows DSO's
handle is non-portable, if multiple entries with the same name exist in
different DSOs).  I.e. the easiest thing would be to name them something
like:
kde_initFactory_module_la
This way, the caller knows what name to call from the name of the module,
and they are disjoint (with high probability).


Ciao,
Michael.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic