pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/13] psppire-dict: g_return_if_fail for idx in psppire_dict


From: Ben Pfaff
Subject: Re: [PATCH 01/13] psppire-dict: g_return_if_fail for idx in psppire_dict_get_variable().
Date: Wed, 18 Apr 2012 22:21:24 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

John Darrington <address@hidden> writes:

> On Tue, Apr 17, 2012 at 09:13:34PM -0700, Ben Pfaff wrote:
>      John Darrington <address@hidden> writes:
>      
>      >      +  g_return_val_if_fail (idx < 0 || dict_get_var_cnt (d->dict) <= 
> idx, NULL);
>      >
>      > Personally I prefer assertions to be written in their separate 
> components rather than ored 
>      > together, like this:
>      >
>      >  g_return_val_if_fail (idx < 0, NULL);
>      >  g_return_val_if_fail (dict_get_var_cnt (d->dict) <= idx, NULL);
>      >    
>      > That way, when the condition fails, it's easier to find out which part 
> of the condition is failing.
>      
>      Fair enough.  I made that change and pushed this commit.
>      
> This seems to be causing the GUI to crash.

Argh.  I've reverted it for the moment, not having time tonight
to fix it properly.  Sorry about that.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]