chiark / gitweb /
algorithms.c: Fix docstring for `GCHash.hashsz'.
[catacomb-python] / algorithms.c
index 4753cf0c3060e623314bc45d7244a0342b208ca3..06fdc3271200f7a99f36fe2786c024dc28bd2e6a 100644 (file)
@@ -787,7 +787,7 @@ static PyObject *ghmeth_done(PyObject *me, PyObject *arg)
 static PyGetSetDef gchash_pygetset[] = {
 #define GETSETNAME(op, name) gch##op##_##name
   GET  (bufsz,                 "CH.bufsz -> hash buffer size, or zero")
-  GET  (hashsz,                "CH.blksz -> hash output size")
+  GET  (hashsz,                "CH.hashsz -> hash output size")
   GET  (name,                  "CH.name -> name of this kind of hash")
 #undef GETSETNAME
   { 0 }
@@ -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;