mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
script_opt: Try updating, failure :-(
This commit is contained in:
parent
8252915713
commit
9a985d7ad0
6 changed files with 22 additions and 16 deletions
|
@ -134,8 +134,8 @@ inline ValPtr field_access__CPP(const RecordValPtr& rec, int field) {
|
|||
#define NATIVE_FIELD_ACCESS(type, zaccessor, vaccessor) \
|
||||
inline type field_access_##type##__CPP(const RecordValPtr& r, int field) { \
|
||||
auto rv = CPPRuntime::RawOptField(r, field); \
|
||||
if ( rv ) \
|
||||
return (*rv).zaccessor(); \
|
||||
if ( rv.IsSet() ) \
|
||||
return rv.GetZVal().zaccessor(); \
|
||||
return field_access__CPP(r, field)->vaccessor(); \
|
||||
}
|
||||
|
||||
|
@ -148,8 +148,8 @@ NATIVE_FIELD_ACCESS(double, AsDouble, AsDouble)
|
|||
#define VP_FIELD_ACCESS(type, zaccessor) \
|
||||
inline type##Ptr field_access_##type##__CPP(const RecordValPtr& r, int field) { \
|
||||
auto rv = CPPRuntime::RawOptField(r, field); \
|
||||
if ( rv ) \
|
||||
return {NewRef{}, rv->zaccessor()}; \
|
||||
if ( rv.IsSet() ) \
|
||||
return {NewRef{}, rv.GetZVal().zaccessor()}; \
|
||||
return cast_intrusive<type>(field_access__CPP(r, field)); \
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue