mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Allow record_fields() string arguments that name a record type
This commit is contained in:
parent
295c28b48e
commit
63fe835acf
7 changed files with 92 additions and 35 deletions
|
@ -75,6 +75,7 @@ class VectorType;
|
|||
class TypeType;
|
||||
class OpaqueType;
|
||||
class EnumVal;
|
||||
class TableVal;
|
||||
|
||||
const int DOES_NOT_MATCH_INDEX = 0;
|
||||
const int MATCHES_INDEX_SCALAR = 1;
|
||||
|
@ -483,6 +484,13 @@ public:
|
|||
|
||||
int NumFields() const { return num_fields; }
|
||||
|
||||
/**
|
||||
* Returns a "record_field_table" value for introspection purposes.
|
||||
* @param rv an optional record value, if given the values of
|
||||
* all fields will be provided in the returned table.
|
||||
*/
|
||||
TableVal* GetRecordFieldsVal(const RecordVal* rv = nullptr) const;
|
||||
|
||||
// Returns 0 if all is ok, otherwise a pointer to an error message.
|
||||
// Takes ownership of list.
|
||||
const char* AddFields(type_decl_list* types, attr_list* attr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue