[Geany-devel] msgwin line and column position
dimitar.zhekov at xxxxx
Thu Aug 18 17:28:33 UTC 2011
On Thu, 18 Aug 2011 12:28:01 +1000
Lex Trotman <elextr at gmail.com> wrote:
> >> pmatch = pmatch;
> Well you obviously get away with it because it isn't really opaque (to
> the compiler), but it is still bad practice to assign such structures
> unless it is documented safe.
Instead of attempting to imagine how a swallow copy may go wrong, I
decided to just assign the two members. libc _can't_ access them for
it's own purposes, because it doesn't know the lifetime of pmatch.
> Technically (gint)l == l is using implementation defined behavior, the
> standard says that the converting to a shorter signed type should give
> the same value if it fits, but if it doesn't fit, its implementation
Yes, if 'l' becomes unsigned long, such a check will be unreliable...
> then the comparison to G_MAXINT is a correct way of doing it.
...which always works, so let's play it safe again. Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 13166 bytes
Desc: not available
More information about the Devel