Re: gtkmm: Pixbuf::get_pixels()
- From: Murray Cumming <murrayc murrayc com>
- To: Daniel Boles <dboles src gmail com>, gtkmm-list gnome org
- Subject: Re: gtkmm: Pixbuf::get_pixels()
- Date: Fri, 17 Mar 2017 14:29:15 +0100
On Fri, 2017-03-17 at 07:55 +0000, Daniel Boles wrote:
The copy is done as follows, to support copy-on-write:
* This function will cause an implicit copy of the pixbuf data if
the
* pixbuf was created from read-only data.
https://git.gnome.org/browse/gdk-pixbuf/tree/gdk-pixbuf/gdk-pixbuf.c#
n674
I thought as long as the apparent functioning of the object is still
the same to external users, then it is allowed to make internal
changes even on a const instance? Using mutable members.
If so, then maybe it would still be OK to wrap that as a const
method.
We are wrapping that as a const method. But we don't need to make
anything mutable. We just const_cast the GdkPixbuf*. C doesn't do full
C++-like const, so this is often necessary.
If I have misunderstood, maybe you could suggest a particular patch.
Thanks.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]