After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589683 - Gio::MemoryInputStream::add_data() wrapped badly
Gio::MemoryInputStream::add_data() wrapped badly
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: giomm
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2009-07-25 13:16 UTC by Jonathon Jongsma
Modified: 2009-07-27 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Minor fix. (1.31 KB, patch)
2009-07-27 14:57 UTC, José Alburquerque
committed Details | Review

Description Jonathon Jongsma 2009-07-25 13:16:13 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.
Comment 1 Jonathon Jongsma 2009-07-27 04:08:27 UTC
fixed in git.
Comment 2 José Alburquerque 2009-07-27 14:56:42 UTC
With your permission, re-opening to attach a minor fix.
Comment 3 José Alburquerque 2009-07-27 14:57:52 UTC
Created attachment 139287 [details] [review]
Minor fix.
Comment 4 José Alburquerque 2009-07-27 15:28:01 UTC
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.
Comment 5 Jonathon Jongsma 2009-07-27 15:34:03 UTC
I was just going to tell you to push it, but apparently you already did.  thanks.  Good catch.