Commit ffffa422 authored by Kevin Modzelewski's avatar Kevin Modzelewski

more minor improvements

parent 8f97277c
......@@ -3650,6 +3650,7 @@ void setupRuntime() {
str_cls->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER;
dict_descr = new (pyston_getset_cls) BoxedGetsetDescriptor(typeSubDict, typeSubSetDict, NULL);
constants.push_back(dict_descr);
type_cls->giveAttr("__dict__", new (pyston_getset_cls) BoxedGetsetDescriptor(typeDict, NULL, NULL));
......
......@@ -506,7 +506,7 @@ public:
void operator delete(void* p) { PyMem_FREE(p); }
static GCdArray* realloc(GCdArray* array, int capacity) {
return (GCdArray*)PyMem_REALLOC(array, capacity);
return (GCdArray*)PyMem_REALLOC(array, capacity * sizeof(Box*) + sizeof(GCdArray));
}
};
......
......@@ -160,6 +160,7 @@ extern "C" void dumpEx(void* p, int levels) {
} else {
printf("\n");
}
printf("Refcount: %ld\n", b->ob_refcnt);
if (b->cls == bool_cls) {
printf("The %s object\n", b == True ? "True" : "False");
......
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