| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (C) 2013 Google, Inc. | 2 # Copyright (C) 2013 Google, Inc. |
| 3 # | 3 # |
| 4 # This library is free software; you can redistribute it and/or | 4 # This library is free software; you can redistribute it and/or |
| 5 # modify it under the terms of the GNU Library General Public | 5 # modify it under the terms of the GNU Library General Public |
| 6 # License as published by the Free Software Foundation; either | 6 # License as published by the Free Software Foundation; either |
| 7 # version 2 of the License, or (at your option) any later version. | 7 # version 2 of the License, or (at your option) any later version. |
| 8 # | 8 # |
| 9 # This library is distributed in the hope that it will be useful, | 9 # This library is distributed in the hope that it will be useful, |
| 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 result ^= (result << 10) | 74 result ^= (result << 10) |
| 75 | 75 |
| 76 # Save 8 bits for StringImpl to use as flags. | 76 # Save 8 bits for StringImpl to use as flags. |
| 77 result &= 0xffffff | 77 result &= 0xffffff |
| 78 | 78 |
| 79 # This avoids ever returning a hash code of 0, since that is used to | 79 # This avoids ever returning a hash code of 0, since that is used to |
| 80 # signal "hash not computed yet". | 80 # signal "hash not computed yet". |
| 81 assert result != 0 | 81 assert result != 0 |
| 82 | 82 |
| 83 return result | 83 return result |
| OLD | NEW |