Why GObject::constructor, not GObject::construct?
- From: Owen Taylor <otaylor redhat com>
- To: timj gtk org
- Cc: gtk-devel-list gtk org
- Subject: Why GObject::constructor, not GObject::construct?
- Date: 08 Jan 2001 16:23:19 -0500
As I read it:
1) object->constructor() can only ever be called from g_object_new()
2) The object->constructor() function must chain up as the first
thing it does - it can't do anything else until the object is
created.
So, why don't we just have a ->construct() virtual function that
is called after g_type_create_instance() and the construct parameters
are set?
This would be:
a) Just as powerful.
b) Simpler, because it would have a normal virtual function prototype.
Also, don't we need a g_object_newv() that takes a list of name/value
pairs, since g_object_new()/g_object_new_valist() isn't language
bindable? Or are language bindings supposed to call
g_object_constructor() directly? (It seems a little painful to figure
out which arguments are construct parameters, etc.)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]