Re: [BRANCHES] Giving some sanity to dates
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: Re: [BRANCHES] Giving some sanity to dates
- Date: Tue, 27 Sep 2011 17:15:24 +0200
On Tue, 2011-09-27 at 14:40 +0200, Guillaume Emont wrote:
> Hmm, it's been a while ago. I probably made it like that out of fear
> that _set_modification_date() gets called while we are using the value
> returned by the getter without taking a reference.
> But arguably, there's the same issue with all the getters of GrlMedia,
> and if we document that the returned value remains owned by the
> GrlMedia, people should expect to have to handle that properly. I'm OK
> to change that (seems to work with bindings too) for consistency.
Yes, well. The point is not only to know if returned data belongs to the
GrlMedia or not, but also to know if user must free it or not.
In the case of returning a string, it's pretty clear from the signature:
the string prefixed with 'const' belongs to GrlMedia and thus shouldn't
be freed.
I really don't know if returning a GDataTime it must be prefixed it
'const' to tell user that the data belongs GrlMedia. If we do it,
clearly it is a pain later to deal with it.
But either if we add the 'const' or not, I would like to see a
consistency, and that's why I'm proposing to return it unreffed.
Any other opinion?
J.A.
PD: Yes it's my full review. Other than those nitpicks, everything is
fine for me.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]