Commit e734cdb7 authored by Kevin Modzelewski's avatar Kevin Modzelewski

gcc fixes

parent b028878c
......@@ -104,8 +104,11 @@ Box* dictSetitem(BoxedDict* self, Box* k, Box* v) {
void dict_dtor(BoxedDict* self) {
self->d.clear();
// I can't believe this works:
(&self->d)->~decltype(self->d)();
// I thought, in disbelief, that this works:
//(&self->d)->~decltype(self->d)();
// but that's only on clang, so instead do this:
typedef decltype(self->d) T;
(&self->d)->~T();
}
void setupDict() {
......
......@@ -126,7 +126,8 @@ extern "C" void tupleGCHandler(GCVisitor *v, void* p) {
BoxedTuple *t = (BoxedTuple*)p;
int size = t->elts.size();
if (size) {
v->visitRange((void**)&t->elts[0], (void**)&t->elts[size]);
v->visitRange(const_cast<void**>((void const*const*)&t->elts[0]),
const_cast<void**>((void const*const*)&t->elts[size]));
}
}
......
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