
On Wed, Feb 26, 2025 at 11:04:23AM +0100, Martin Kletzander wrote:
The classic Hal fixing a lightbulb moment ;)
At least more productive than spending an hour performing the "Hal looking for his glasses" routine (my variation usually concerns my phone, which is invariably in one of my pockets the entire time).
[...]
On 2/26/25 10:53 AM, Daniel P. Berrangé wrote:
An alternative option is to port everything that uses virObject over to use GObject, since virObject is just a thin back-compat shim.
I didn't pay attention at the time (or since) - is there 0 extra functionality in virObject that isn't in GObject (aside from the object size limitation you mention below)?
With GObject there is no need to manually call functions to create classes. There's just a static struct declared which triggers creation of classes on first use. virIdentity is an example of an object doing that.
Many are easy to change, but some of the larger objects will have trouble as GObject artificially limits (public) struct size to 64k IIRC, expecting you to have the split public/private struct design where the private struct can be arbitrarily huge
Why didn't they just make the maximum struct size 640k? Bill's Law says that should be big enough for possible object.