GNOME Bugzilla – Bug 589683
Gio::MemoryInputStream::add_data() wrapped badly
Last modified: 2009-07-27 15:34:03 UTC
an email from the mailing list: On Sat, Jul 18, 2009 at 3:29 PM, Robert Hildebrandt<roberts_katz@gmx.de> wrote: > Hi, > > Some Suggestions (for the case it's all nonsence: sorry - I'm a beginner) > I spend two days wondering, why my program didn't worked, until I found out, > that Gio::MemoryInputStream::add_data doesn't copy anything, and > MemoryInputStream owns the pointer afterwards. > I thing, that it could be useful for other users if this was documented (I'm > using glibmm 2.4 Documentation (does anybody know why it's 2.4 and not 2.20 > like the current Version?)) > Also it could be nice if there was a possibility to define the > GDestroyNotify Function without beeing forced to wrap a C Object > It seems that we wrap the add_data() with a std::string argument and a raw pointer argument, but the raw pointer one doesn't provide a way to specify a free DestroyNotify function nor does it document that we (apparently) free it ourselves. The raw pointer overload should probably be deprecated and wrapped properly.
fixed in git.
With your permission, re-opening to attach a minor fix.
Created attachment 139287 [details] [review] Minor fix.
Once more, with your permission, pushed to master. I hope that's okay. Once more, it's minor but I wanted to avoid you having to discover this later, and since I noticed it, I quickly fixed it for you.
I was just going to tell you to push it, but apparently you already did. thanks. Good catch.