687 static PyObject *
688 Bucket_maxminKey(Bucket *self, PyObject *args, int min)
689 {
690 PyObject *key=0;
691 int rc, offset = 0;
692 int empty_bucket = 1;
693
694 if (args && ! PyArg_ParseTuple(args, "|O", &key)) return NULL;
taking True path
when PyArg_ParseTuple() succeeds
taking False path
695
696 PER_USE_OR_RETURN(self, NULL);
when considering range: -128 <= value <= -2
taking False path
when considering range: -128 <= value <= -1
taking False path
697
698 UNLESS (self->len) goto empty;
when considering range: 1 <= value <= 0x7fffffff
taking False path
699
700 /* Find the low range */
701 if (key)
taking True path
702 {
703 if ((rc = Bucket_findRangeEnd(self, key, min, 0, &offset)) <= 0)
when considering range: -0x80000000 <= value <= 0
taking True path
704 {
705 if (rc < 0) return NULL;
when considering range: -0x80000000 <= value <= -1
taking True path
706 empty_bucket = 0;
707 goto empty;
708 }
709 }
710 else if (min) offset = 0;
711 else offset = self->len -1;
712
713 COPY_KEY_TO_OBJECT(key, self->keys[offset]);
714 PER_UNUSE(self);
715
716 return key;
717
718 empty:
719 PyErr_SetString(PyExc_ValueError,
720 empty_bucket ? "empty bucket" :
721 "no key satisfies the conditions");
722 PER_UNUSE(self);
723 return NULL;
724 }
returning (PyObject*)NULL without setting an exception
found 1 similar trace(s) to this