Commit ffffa422 authored by Kevin Modzelewski's avatar Kevin Modzelewski

more minor improvements

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