[Spice-devel] [PATCH spice-server] style: Specify boolean style convention
Christophe Fergeau
cfergeau at redhat.com
Mon Feb 27 11:27:37 UTC 2017
Maybe add a note that this *changes* existing conventions.
Not sure it's worth doing a global s/TRUE/true though.
Looks good to me.
Christophe
On Thu, Feb 23, 2017 at 05:37:52PM +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> docs/spice_style.txt | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/docs/spice_style.txt b/docs/spice_style.txt
> index cd874df..99c8390 100644
> --- a/docs/spice_style.txt
> +++ b/docs/spice_style.txt
> @@ -47,10 +47,18 @@ Examples: +
> use `(var == 7)` instead of `(7 == var)` +
> use `(function(var) > 7)` instead of `(7 < function(var))`
>
> -TRUE, FALSE and NULL
> +boolean type
> +------------
> +Where possible prefer the usage of `bool` type to store boolean.
> +
> +If not technically possible (ie libJPEG uses `boolean` while GLib uses `gboolean`) uses proper library type.
> +
> +Constants should be consistent with the type used so `true` and `false` for `bool` type.
> +
> +true, false and NULL
> --------------------
>
> -Use `TRUE`, `FALSE` and `NULL` instead of 1 and 0 in order to improve code readability.
> +Use `true`, `false` and `NULL` instead of 1 and 0 in order to improve code readability.
>
> Static storage initialization
> -----------------------------
> --
> 2.9.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170227/517876d6/attachment.sig>
More information about the Spice-devel
mailing list