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:
35e5469
)
algorithms.c: Set required size on GMAC objects.
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>
Fri, 7 Apr 2017 10:37:20 +0000
(11:37 +0100)
The Python interpreter catches this in debug mode. Also, it's really
bad.
algorithms.c
patch
|
blob
|
blame
|
history
diff --git
a/algorithms.c
b/algorithms.c
index 4753cf0c3060e623314bc45d7244a0342b208ca3..60cfd58d04b6b89a3c0bac2f0a47389e1355d477 100644
(file)
--- a/
algorithms.c
+++ b/
algorithms.c
@@
-996,6
+996,7
@@
PyObject *gmac_pywrap(PyObject *cobj, gmac *m, unsigned f)
if (!cobj) cobj = gcmac_pywrap((/*unconst*/ gcmac *)GM_CLASS(m));
else Py_INCREF(cobj);
g = newtype((PyTypeObject *)cobj, 0, 0);
+ g->ty.ht_type.tp_basicsize = sizeof(ghash_pyobj);
g->ty.ht_name = PyString_FromFormat("%s(keyed)", m->ops->c->name);
g->ty.ht_type.tp_name = PyString_AS_STRING(g->ty.ht_name);
g->ty.ht_type.tp_base = gmhash_pytype;