Re: [Vala] [ModuleInit] and __attribute__ ((constructor)) ?



On Sat, 2008-12-13 at 20:34 +0600, Ildar Mulyukov wrote:
On 12.12.2008 14:04:51, Jürg Billeter wrote:
Hi Ildar,

On Wed, 2008-10-15 at 03:03 +0600, Ildar Mulyukov wrote:
I am very new to Vala. Great thanks to Jürg and participants.
I've a question (or it's really two separate questions?)
1. What does [ModuleInit] do?
Vala uses g_type_module_register_type if you add the [ModuleInit]  
attribute. That's needed if you want to dynamically load and unload  
plug-ins that define types in the GObject type system.

Again, I've checked the generated C-code for it and found that it does  
nothing noticeable. That means, that I've compiled with and without  
[ModuleInit].

The method marked with [ModuleInit] also requires a TypeModule parameter
as in the example on http://live.gnome.org/Vala/TypeModules

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]