Quoting Adam Jackson (2016-03-24 11:10:03)
[snip]
> @@ -620,9 +617,10 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
>                  if s == 0: s = 1
>  
>                  sig += "(%u,%u)" % (f.offset_of(p.counter), s)
> -                size += '%s%s' % (plus, p.size_string())
> -                plus = ' + '
> -
> +               if size is '':

Use '==' not 'is' here.

Python's 'A is B' compares whether A is the exact same instance as B,
not if they have the same value, implementation details of CPython make
this work for small ints and strings/bytes/unicode...usually. Generally
save 'is' for comparisons with singletons like True, False, and None.

> +                   size = p.size_string()
> +               else:
> +                   size = "safe_add(%s, %s)" % (size, p.size_string())
>  

[snip]

Attachment: signature.asc
Description: signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to