X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib-python/blobdiff_plain/78911cdb6782ddccef6de3cc913b714e10d2fc14..f9d8a4272810eef131b0be8923b93d682bf95937:/assoc.pyx diff --git a/assoc.pyx b/assoc.pyx index 246bb24..7685dd6 100644 --- a/assoc.pyx +++ b/assoc.pyx @@ -38,7 +38,7 @@ cdef class AssocTable (Mapping): cdef _assoc_entry *e cdef atom *a a = ATOM_A(atom_pyintern(key)) - PyObject_AsReadBuffer(key, &p, &n) + PyObject_AsReadBuffer(key, &p, &n) if f: f[0] = 0 e = <_assoc_entry *>assoc_find(&me._t, a, PSIZEOF(e), f) @@ -73,7 +73,7 @@ cdef class AssocTable (Mapping): cdef class _AssocIter (_MapIterator): cdef AssocTable t cdef assoc_iter i - def __cinit__(me, AssocTable t): + def __cinit__(me, AssocTable t not None): me.t = t assoc_mkiter(&me.i, &me.t._t) cdef void *_next(me):