ges: Mark GValue in child property setters as const

We can't change the vmethod at this point so just cast. This makes
the API more explicit so it is better in all cases.
This commit is contained in:
Thibault Saunier 2018-11-02 09:30:28 -03:00
parent 412fd0107c
commit 534855d42e
2 changed files with 6 additions and 6 deletions

View file

@ -1387,7 +1387,7 @@ not_found:
*/
void
ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self,
GParamSpec * pspec, GValue * value)
GParamSpec * pspec, const GValue * value)
{
ChildPropHandler *handler;
GESTimelineElementClass *klass;
@ -1401,7 +1401,7 @@ ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self,
klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);
g_assert (klass->set_child_property);
klass->set_child_property (self, handler->child, pspec, value);
klass->set_child_property (self, handler->child, pspec, (GValue *) value);
return;
@ -1428,7 +1428,7 @@ not_found:
*/
gboolean
ges_timeline_element_set_child_property (GESTimelineElement * self,
const gchar * property_name, GValue * value)
const gchar * property_name, const GValue * value)
{
GParamSpec *pspec;
GESTimelineElementClass *klass;
@ -1441,7 +1441,7 @@ ges_timeline_element_set_child_property (GESTimelineElement * self,
klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);
g_assert (klass->set_child_property);
klass->set_child_property (self, child, pspec, value);
klass->set_child_property (self, child, pspec, (GValue *) value);
gst_object_unref (child);
g_param_spec_unref (pspec);

View file

@ -287,7 +287,7 @@ ges_timeline_element_set_child_property_valist (GESTimelineElement * self,
GES_API void
ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self,
GParamSpec * pspec,
GValue * value);
const GValue * value);
GES_API
void ges_timeline_element_set_child_properties (GESTimelineElement * self,
const gchar * first_property_name,
@ -296,7 +296,7 @@ void ges_timeline_element_set_child_properties (GESTimelineElement * self,
GES_API
gboolean ges_timeline_element_set_child_property (GESTimelineElement *self,
const gchar *property_name,
GValue * value);
const GValue * value);
GES_API
gboolean ges_timeline_element_get_child_property (GESTimelineElement *self,