From 02654aefdaf6d3aaa3ab3f5100cf5e1ce32c1d20 Mon Sep 17 00:00:00 2001 From: fche Date: Thu, 10 Nov 2005 19:16:15 +0000 Subject: 2005-11-10 Frank Ch. Eigler * translate.cxx (c_unparser::visit_array_in, visit_arrayindex): Finish adapting to PR 1275 by switching back to read locks. --- translate.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index 70abbc51..42ce3e45 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1968,8 +1968,7 @@ c_unparser::visit_array_in (array_in* e) { // block used to control varlock_r lifespan mapvar mvar = getmap (e->operand->referent, e->tok); - // XXX: should be varlock_r, but runtime arrays reads mutate - varlock_w guard (*this, mvar); + varlock_r guard (*this, mvar); c_assign (res, mvar.exists(idx), e->tok); } @@ -2323,9 +2322,8 @@ c_unparser::visit_arrayindex (arrayindex* e) { // block used to control varlock_r lifespan mapvar mvar = getmap (e->referent, e->tok); - // XXX: should be varlock_r, but runtime arrays reads mutate o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; - varlock_w guard (*this, mvar); + varlock_r guard (*this, mvar); c_assign (res, mvar.get(idx), e->tok); } -- cgit