@@ -452,7 +452,6 @@ typedef struct FAMIObject {
452452 Py_ssize_t index ; // current index state, mutated in-place
453453} FAMIObject ;
454454
455-
456455static void
457456fami_dealloc (FAMIObject * self )
458457{
@@ -551,7 +550,6 @@ static PyTypeObject FAMIType = {
551550 .tp_name = "arraymap.FrozenAutoMapIterator" ,
552551};
553552
554-
555553static PyObject *
556554fami_new (FAMObject * fam , ViewKind kind , bool reversed )
557555{
@@ -602,27 +600,23 @@ name(PyObject *left, PyObject *right) \
602600 return result; \
603601}
604602
605-
606603FAMV_SET_OP (famv_and , And )
607604FAMV_SET_OP (famv_or , Or )
608605FAMV_SET_OP (famv_subtract , Subtract )
609606FAMV_SET_OP (famv_xor , Xor )
610607
611608# undef FAMV_SET_OP
612609
613-
614610static PyNumberMethods famv_as_number = {
615611 .nb_and = (binaryfunc ) famv_and ,
616612 .nb_or = (binaryfunc ) famv_or ,
617613 .nb_subtract = (binaryfunc ) famv_subtract ,
618614 .nb_xor = (binaryfunc ) famv_xor ,
619615};
620616
621-
622617static int fam_contains (FAMObject * , PyObject * );
623618static PyObject * famv_fami_new (FAMVObject * );
624619
625-
626620static int
627621famv_contains (FAMVObject * self , PyObject * other )
628622{
@@ -638,41 +632,35 @@ famv_contains(FAMVObject *self, PyObject *other)
638632 return result ;
639633}
640634
641-
642635static PySequenceMethods famv_as_sequence = {
643636 .sq_contains = (objobjproc ) famv_contains ,
644637};
645638
646-
647639static void
648640famv_dealloc (FAMVObject * self )
649641{
650642 Py_DECREF (self -> fam );
651643 PyObject_Del ((PyObject * )self );
652644}
653645
654-
655646static PyObject *
656647famv_fami_new (FAMVObject * self )
657648{
658649 return fami_new (self -> fam , self -> kind , false);
659650}
660651
661-
662652static PyObject *
663653famv_length_hint (FAMVObject * self )
664654{
665655 return PyLong_FromSsize_t (self -> fam -> keys_size );
666656}
667657
668-
669658static PyObject *
670659famv_reversed (FAMVObject * self )
671660{
672661 return fami_new (self -> fam , self -> kind , true);
673662}
674663
675-
676664static PyObject *
677665famv_isdisjoint (FAMVObject * self , PyObject * other )
678666{
@@ -685,7 +673,6 @@ famv_isdisjoint(FAMVObject *self, PyObject *other)
685673 return PyBool_FromLong (result );
686674}
687675
688-
689676static PyObject *
690677famv_richcompare (FAMVObject * self , PyObject * other , int op )
691678{
@@ -704,15 +691,13 @@ famv_richcompare(FAMVObject *self, PyObject *other, int op)
704691 return result ;
705692}
706693
707-
708694static PyMethodDef famv_methods [] = {
709695 {"__length_hint__" , (PyCFunction ) famv_length_hint , METH_NOARGS , NULL },
710696 {"__reversed__" , (PyCFunction ) famv_reversed , METH_NOARGS , NULL },
711697 {"isdisjoint" , (PyCFunction ) famv_isdisjoint , METH_O , NULL },
712698 {NULL },
713699};
714700
715-
716701static PyTypeObject FAMVType = {
717702 PyVarObject_HEAD_INIT (NULL , 0 )
718703 .tp_as_number = & famv_as_number ,
@@ -725,7 +710,6 @@ static PyTypeObject FAMVType = {
725710 .tp_richcompare = (richcmpfunc ) famv_richcompare ,
726711};
727712
728-
729713static PyObject *
730714famv_new (FAMObject * fam , ViewKind kind )
731715{
0 commit comments