Glib::Flags overloaded mutators



It'd be good if Glib::Flags had overloaded += as well as + so you could
go

        $f += 'val';

I think the basic overload can be used without too much trouble, the new
object returned being assigned to the destination automatically by
"overload".

I remember a long time ago making mutators which peeked into the target
object and on refcount==1 changed it in-place instead of creating a new
one.  I guess that's possible with Glib::Flags too, though it's small
enough it might not be worth bothering.


Attachment: GType.xs.mutators.diff
Description: Text Data

Attachment: Glib.pm.mutators.diff
Description: Text Data

Attachment: c.t.mutators.diff
Description: Text Data



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