PetScan::extract_argument: avoid modifying part of pet_expr
commit5d1a9d02a2096373391092791c85599381fa413c
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 21 Mar 2014 11:00:16 +0000 (21 12:00 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 21 Mar 2014 11:17:38 +0000 (21 12:17 +0100)
tree25b7335866641466bf0d7b9b2df7e35cbfd765ad
parent1263017db2f1054c221a924370c549c79a48a16d
PetScan::extract_argument: avoid modifying part of pet_expr

In the next commit, we will be making pet_expr objects reference counted,
which means that we will no longer be able to modify part of a pet_expr
without also modifying the enclosing pet_expr.
Postpone the construction of the enclosing pet_expr until after
the possible modification.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc