diff --git a/CHANGES b/CHANGES index b071a4078e..908aed297f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +4.1.0-dev.823 | 2021-06-29 10:24:08 -0700 + + * made RecordVal::AppendField protected: it's low-level & requires knowledge of internals (Vern Paxson, Corelight) + 4.1.0-dev.821 | 2021-06-29 08:38:37 -0700 * Fix package name for CMake on CentOS 8 (Dominik Charousset, Corelight) diff --git a/VERSION b/VERSION index 3a4512fca6..4f67dbbb92 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.0-dev.821 +4.1.0-dev.823 diff --git a/src/Val.h b/src/Val.h index 2e4e299336..dca7d16784 100644 --- a/src/Val.h +++ b/src/Val.h @@ -1182,22 +1182,6 @@ public: Assign(idx, std::forward(val)); } - /** - * Appends a value to the record's fields. The caller is responsible - * for ensuring that fields are appended in the correct order and - * with the correct type. The type needs to be passed in because - * it's unsafe to take it from v when the field's type is "any" while - * v is a concrete type. - * @param v The value to append. - */ - void AppendField(ValPtr v, const TypePtr& t) - { - if ( v ) - record_val->emplace_back(ZVal(v, t)); - else - record_val->emplace_back(std::nullopt); - } - /** * Returns the number of fields in the record. * @return The number of fields in the record. @@ -1422,6 +1406,23 @@ public: protected: friend class zeek::detail::ZBody; + /** + * Appends a value to the record's fields. The caller is responsible + * for ensuring that fields are appended in the correct order and + * with the correct type. The type needs to be passed in because + * it's unsafe to take it from v when the field's type is "any" while + * v is a concrete type. + * @param v The value to append. + * @param t The type associated with the field. + */ + void AppendField(ValPtr v, const TypePtr& t) + { + if ( v ) + record_val->emplace_back(ZVal(v, t)); + else + record_val->emplace_back(std::nullopt); + } + // For use by low-level ZAM instructions. Caller assumes // responsibility for memory management. The first version // allows manipulation of whether the field is present at all.