Mercurial > cpython-lru_cache-weakref
comparison Modules/arraymodule.c @ 70695:fc282e375703
Remove some extraneous parentheses and swap the comparison order to
prevent accidental assignment.
Silences a warning from LLVM/clang 2.9.
| author | Brett Cannon <brett@python.org> |
|---|---|
| date | Mon, 06 Jun 2011 20:20:36 -0700 |
| parents | b39270c6b8d1 |
| children | 8587305b259b |
comparison
equal
deleted
inserted
replaced
| 70694:b313fc77fa11 | 70695:fc282e375703 |
|---|---|
| 2089 len = Py_SIZE(a); | 2089 len = Py_SIZE(a); |
| 2090 typecode = a->ob_descr->typecode; | 2090 typecode = a->ob_descr->typecode; |
| 2091 if (len == 0) { | 2091 if (len == 0) { |
| 2092 return PyUnicode_FromFormat("array('%c')", (int)typecode); | 2092 return PyUnicode_FromFormat("array('%c')", (int)typecode); |
| 2093 } | 2093 } |
| 2094 if ((typecode == 'u')) | 2094 if ('u' == typecode) |
| 2095 v = array_tounicode(a, NULL); | 2095 v = array_tounicode(a, NULL); |
| 2096 else | 2096 else |
| 2097 v = array_tolist(a, NULL); | 2097 v = array_tolist(a, NULL); |
| 2098 | 2098 |
| 2099 s = PyUnicode_FromFormat("array('%c', %R)", (int)typecode, v); | 2099 s = PyUnicode_FromFormat("array('%c', %R)", (int)typecode, v); |
