New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glib: Add new object constructor for constructing an object with default property values #910
Conversation
Is this really that common that we need to optimize for it? Usually this is wrapped into a Maybe we should
|
All the
This would be called from the |
Previously we were copying each parameter value potentially twice, now it is only going to be copied inside C if at all. Also allocate the array of properties on the stack if only a few properties are used.
032d982
to
c4ef7c0
Compare
Also note that I'm working on deprecating |
Ah ok then, if the redundancy is removed the other way round then ok |
Initable and AsyncInitable will need the same updates for consistency |
c4ef7c0
to
95a7ef9
Compare
Yeah they should also get builders. That API became quite bitrotten already... |
As discussed, names are as good as it can be for this release and for the release afterwards (after having deprecated I'll finish the (async) initable changes and then merge this. |
…ult property values And also keep the `gio::Initable` / `gio::AsyncInitable` API in sync, i.e. add a builder and the new contructors there too.
95a7ef9
to
52d39ab
Compare
Nicer than writing
Object::new(&[])
.Also optimize the object builder a bit.