Commit 8f97277c authored by Kevin Modzelewski's avatar Kevin Modzelewski

small fixes

parent ab141424
......@@ -3276,8 +3276,10 @@ void commonClassSetup(BoxedClass* cls) {
}
/* Calculate method resolution order */
if (mro_internal(cls) < 0)
throwCAPIException();
if (!cls->tp_mro) {
if (mro_internal(cls) < 0)
throwCAPIException();
}
if (cls->tp_base)
inherit_special(cls, cls->tp_base);
......
......@@ -748,8 +748,10 @@ Box* listIAdd(BoxedList* self, Box* _rhs) {
int s1 = self->size;
int s2 = rhs->size;
if (s2 == 0)
if (s2 == 0) {
Py_INCREF(self);
return self;
}
self->ensure(s1 + s2);
......@@ -769,8 +771,10 @@ Box* listIAdd(BoxedList* self, Box* _rhs) {
int s1 = self->size;
int s2 = rhs->ob_size;
if (s2 == 0)
if (s2 == 0) {
Py_INCREF(self);
return self;
}
self->ensure(s1 + s2);
......
......@@ -133,7 +133,10 @@ extern "C" void dumpEx(void* p, int levels) {
printf("\n");
printf("Raw address: %p\n", p);
if ((((intptr_t)p) & 0x7) == 0) {
if ((intptr_t)p < 0x1000){
if (p != NULL)
printf("Not a real pointer?\n");
} else if ((((intptr_t)p) & 0x7) == 0) {
uint8_t lowbyte = *reinterpret_cast<uint8_t*>(p);
if (lowbyte == 0xcb) {
printf("Uninitialized memory\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment