chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b54260
)
bytestring.c: Check for cached hash more carefully.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000
(09:26 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 12 Apr 2017 21:02:02 +0000
(22:02 +0100)
The `CACHE_HASH' symbol has been missing for years because the feature
is always on nowadays. Amazingly, I never noticed.
bytestring.c
patch
|
blob
|
blame
|
history
diff --git
a/bytestring.c
b/bytestring.c
index b78ec1451510ffb35febc757771db4d309cde63e..7dcc4065238ffbc14c7d532afa8b76be5c5520c0 100644
(file)
--- a/
bytestring.c
+++ b/
bytestring.c
@@
-37,7
+37,7
@@
static PyObject *dowrap(PyTypeObject *ty, const void *p, size_t n)
PyStringObject *x = (PyStringObject *)ty->tp_alloc(ty, n);
if (p) memcpy(x->ob_sval, p, n);
x->ob_sval[n] = 0;
-#if
def CACHE_HASH
+#if
defined(CACHE_HASH) || PY_VERSION_HEX >= 0x02030000
x->ob_shash = -1;
#endif
x->ob_sstate = SSTATE_NOT_INTERNED;