chiark / gitweb /
assoc.pyx, sym.pyx: Mark arguments as `not None'.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 27 Jul 2017 09:49:10 +0000 (10:49 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 16 Aug 2017 03:31:32 +0000 (04:31 +0100)
They should have been marked before, but I was careless.  Apparently
this will be the default in future, which seems like a good thing.

assoc.pyx
sym.pyx

index 38b8446f4b0ba86411b7a13706f904c7a6eb7629..7685dd6b3f2ebe04959087cd7204318e0c3a5065 100644 (file)
--- a/assoc.pyx
+++ b/assoc.pyx
@@ -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):
diff --git a/sym.pyx b/sym.pyx
index 48ba3f05a1b24d4d91a2d8b2c574b759d4519d3c..eab698401b6da211f726539f832e1dd46170d1ce 100644 (file)
--- a/sym.pyx
+++ b/sym.pyx
@@ -71,7 +71,7 @@ cdef class SymTable (Mapping):
 cdef class _SymIter (_MapIterator):
   cdef SymTable t
   cdef sym_iter i
-  def __cinit__(me, SymTable t):
+  def __cinit__(me, SymTable t not None):
     me.t = t
     sym_mkiter(&me.i, &me.t._t)
   cdef void *_next(me):