From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2011-01-14 19:50:50
|
https://bugzilla.gnome.org/show_bug.cgi?id=639558 gnome-perl | Gtk2 | unspecified Summary: Pixbuf new_from_data() vs overload Classification: Bindings Product: gnome-perl Version: unspecified OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: Gtk2 AssignedTo: gtk...@li... ReportedBy: us...@zi... QAContact: gtk...@li... GNOME target: --- GNOME version: --- Created an attachment (id=178349) View: https://bugzilla.gnome.org/attachment.cgi?id=178349 Review: https://bugzilla.gnome.org/review?bug=639558&attachment=178349 patch and test case Is there a reason Gtk2::Gdk::Pixbuf->new_from_data() demands SvPOK of its data input? I thought it might SvPV to stringize in the usual way. Doing so would allow overloads and magic to work there the same way as they do elsewhere. (It normally seems like a bad idea to enquire into the nature of a scalar. For a string ask for a string and let perl worry how to get it :-) Possible simplification below, copying out the SvPV data into a malloced block for the pixbuf data area rather than an newSVsv. (I plan also to check the length of the input, to see the given width*height and rowstride won't overrun the data area. That would be with or without this change. Maybe SvPVbytes too if it unmangles any 0x80 to 0xFF wide chars, and/or guards against chars 0x100 up.) -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2011-08-08 16:02:51
|
https://bugzilla.gnome.org/show_bug.cgi?id=639558 gnome-perl | Gtk2 | unspecified Torsten Schoenfeld <kaffeetisch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kaf...@gm... --- Comment #1 from Torsten Schoenfeld <kaf...@gm...> 2011-08-08 16:02:40 UTC --- (In reply to comment #0) > Is there a reason Gtk2::Gdk::Pixbuf->new_from_data() demands SvPOK of its data > input? I thought it might SvPV to stringize in the usual way. Doing so would > allow overloads and magic to work there the same way as they do elsewhere. Sounds good to me. > Possible simplification below, copying out the SvPV data into a malloced block > for the pixbuf data area rather than an newSVsv. Also good. But any particular reason you use perl's memory-handling macros? Nearly all the other code in Glib and Gtk2 uses glib's things (g_new, g_memdup). -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2011-08-17 01:40:09
|
https://bugzilla.gnome.org/show_bug.cgi?id=639558 gnome-perl | Gtk2 | unspecified --- Comment #2 from Kevin Ryde <us...@zi...> 2011-08-17 01:39:58 UTC --- I can't remember why I thought the perl malloc was a good idea, only maybe to use perl mallocs from within the perl level. Both die horribly when out of memory if I'm not mistaken, though no doubt in subtly different ways. Do the perl ones attempt exit/cleanups better? Otherwise I don't suppose it makes a difference. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2011-08-17 22:13:41
|
https://bugzilla.gnome.org/show_bug.cgi?id=639558 gnome-perl | Gtk2 | unspecified Torsten Schoenfeld <kaffeetisch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #3 from Torsten Schoenfeld <kaf...@gm...> 2011-08-17 22:13:30 UTC --- Yeah, I guess you're right. I thought that with g_new and friends, there might be a possibility of some memory pooling happening, but that can also be said about New and friends. Patch committed with slight adjustments. Thanks. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2011-08-17 22:13:47
|
https://bugzilla.gnome.org/show_bug.cgi?id=639558 gnome-perl | Gtk2 | unspecified Torsten Schoenfeld <kaffeetisch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178349|none |committed status| | -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |