Pluggable module support in uim(was Re: [Uim] Will you upload daily snapshots of UIM?)

Masahito Omote omote at t-base.ne.jp
Wed Jan 5 13:47:11 EET 2005


Hi, YamaKen-san

On Tue, 04 Jan 2005 14:37:02 +0900
YamaKen <yamaken at bp.iij4u.or.jp> wrote:

> Hi Masahito, I have one suggestion about plugin interface.
> 
> The current implementation uses 'plugin_init' as per-plugin
> instance initialization. But its common and short name of symbol
> will easily be conflicted with other libraries.
> 
> $ objdump -TC libuim-m17nlib.so|fgrep .text
> 00001544 l    d  .text  00000000 
> 00002f10 g    DF .text  0000001e plugin_init
> 00001bc4 g    DF .text  00000076 uim_quit_m17nlib
> 00002ce8 g    DF .text  00000225 uim_init_m17nlib
> 
> So I suggest renaming the 'plugin_init' with more proper and
> specific one such as 'uim_plugin_instance_init'. The
> finalization function should also be so.
> 
> Hou do you think about?

'plugin_init' has a possiblity of confliction in namespace. If we will
support both as pluging and statically linked with libuim like apache,
we have to rename them. 'uim_plugin_instance_init' and
'uim_plugin_instance_finalize' are good.

I also think of another way, that is only export one variable initialized
by 'struct _uim_plugin_info'. In this structure, initialization and finalization
functions' pointers are contained.

But I don't confident which way is better.

Thanks,
-- 
Masahito Omote(omote at utyuuzin.net, omote at sapmed.ac.jp, omote at debian.org)



More information about the uim mailing list