#2829: Piraha lookup ref issue
Reporter: Steven R. Brandt
Status: open
Milestone:
Version:
Type: bug
Priority: major
Component: Cactus
Comment (by Roland Haas):
‌
Applied as git hash \[ddf3c7ac\]\([https://bitbucket.org/cactuscode/cactus/commits/ddf3c7ac2363d1ef2c75fc1c22e52373e50d6633](https://bitbucket.org/cactuscode/cactus/commits/ddf3c7ac2363d1ef2c75fc1c22e52373e50d6633)\) "Cactus: lookup\_var should return a shared\_ptr<const Value>, not a shared\_ptr<Value>." of \[cactus\]\([https://bitbucket.org/cactuscode/cactus](https://bitbucket.org/cactuscode/cactus)
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2829/piraha-lookup-ref…
#2829: Piraha lookup ref issue
Reporter: Steven R. Brandt
Status: new
Milestone:
Version:
Type: bug
Priority: major
Component: Cactus
Flesh: Currently, lookup\_var returns a reference to the value of a var. When a unop is called, this has the effect of negating the value in the table. Thus:
```
$zip = 1
foo::xmin = -$zip
foo::xmax = $zip
```
This results in both xmin and xmax being set to the same value \(-1\). The fix is to have lookup\_var return a copy rather than a reference.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2829/piraha-lookup-ref…