[gst-devel] GstStructure mutability question

David Schleef ds at schleef.org
Mon Feb 11 21:32:41 CET 2008

On Sun, Feb 10, 2008 at 09:41:20AM -0500, José Alburquerque wrote:
> In trying to provide C++ bindings, I'm encountering a few difficulties 
> with GstStructure immutability because in C++, inadvertently, an object 
> such as a GstCaps may be referenced more than once by a simple C++ 
> statement (by our design, of course) such as:
> caps->set_simple("field1", value1)->set_simple("field2", 
> value2)->set_simple("field3", val3);

Could you come up with a better example?  You've changed the return
value of set_simple, which seems like a dangerous path to follow for
a language wrapper.


More information about the gstreamer-devel mailing list