Adding a new RecordVal method LookupWithDefault().

The method honors a potential &default attribute, and refs the Val it
returns.
This commit is contained in:
Robin Sommer 2011-02-28 22:20:29 -08:00
parent ba2c6f6139
commit d673c8c64c
2 changed files with 17 additions and 3 deletions

View file

@ -909,7 +909,8 @@ public:
{ return new Val(record_type->NumFields(), TYPE_COUNT); }
void Assign(int field, Val* new_val, Opcode op = OP_ASSIGN);
Val* Lookup(int field) const;
Val* Lookup(int field) const; // does not Ref() value.
Val* LookupWithDefault(int field) const; // does Ref() value.
void Describe(ODesc* d) const;