[Bug 711300] New: Take a const foo * when we can warrant this behavior

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat Nov 2 10:39:34 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=711300
  GStreamer | gstreamer (core) | git

           Summary: Take a const foo * when we can warrant this behavior
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: reynaldo at opendot.cl
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=258812)
 View: https://bugzilla.gnome.org/attachment.cgi?id=258812
 Review: https://bugzilla.gnome.org/review?bug=711300&attachment=258812

change implemented for GstBuffer getsize()s

Some of the base API funcs like the GstBuffer's getsize()s ones could easily be
reprotyped so they explicitly state they are going to leave the memory some of
their params point to unchanged (the GstBuffer * ones in these cases).

Patch attached should be harmless and help the developer better predict these
function's behavior regarding the passed on pointer's mem. Should also help
easily spot problems (in this regard and at compile time) with these function's
implementations.

Arguably trivial, I stumbled at this while porting a func that was getting
a const GstBuffer *foo and tried to get the size of it afterwards.

-- 
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.


More information about the gstreamer-bugs mailing list