mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge branch 'intrusive_ptr' of https://github.com/MaxKellermann/zeek
* 'intrusive_ptr' of https://github.com/MaxKellermann/zeek: (32 commits) Scope: store IntrusivePtr in `local` Scope: pass IntrusivePtr to AddInit() DNS_Mgr: use class IntrusivePtr Scope: use class IntrusivePtr Attr: use class IntrusivePtr Expr: check_and_promote_expr() returns IntrusivePtr Frame: use class IntrusivePtr Val: RecordVal::LookupWithDefault() returns IntrusivePtr Type: RecordType::FieldDefault() returns IntrusivePtr Val: TableVal::Delete() returns IntrusivePtr Type: base_type() returns IntrusivePtr Type: init_type() returns IntrusivePtr Type: merge_types() returns IntrusivePtr Type: use class IntrusivePtr in VectorType Type: use class IntrusivePtr in EnumType Type: use class IntrusivePtr in FileType Type: use class IntrusivePtr in TypeDecl Type: make TypeDecl `final` and the dtor non-`virtual` Type: use class IntrusivePtr in TypeType Type: use class IntrusivePtr in FuncType ...
This commit is contained in:
commit
b62727a7fa
108 changed files with 1737 additions and 2067 deletions
|
@ -3,6 +3,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Obj.h"
|
||||
#include "IntrusivePtr.h"
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
@ -22,7 +23,7 @@ class BroFile : public BroObj {
|
|||
public:
|
||||
explicit BroFile(FILE* arg_f);
|
||||
BroFile(FILE* arg_f, const char* filename, const char* access);
|
||||
BroFile(const char* filename, const char* access, BroType* arg_t = 0);
|
||||
BroFile(const char* filename, const char* access);
|
||||
~BroFile() override;
|
||||
|
||||
const char* Name() const;
|
||||
|
@ -36,7 +37,7 @@ public:
|
|||
|
||||
void SetBuf(bool buffered); // false=line buffered, true=fully buffered
|
||||
|
||||
BroType* FType() const { return t; }
|
||||
BroType* FType() const { return t.get(); }
|
||||
|
||||
// Whether the file is open in a general sense; it might
|
||||
// not be open as a Unix file due to our management of
|
||||
|
@ -93,7 +94,7 @@ protected:
|
|||
void RaiseOpenEvent();
|
||||
|
||||
FILE* f;
|
||||
BroType* t;
|
||||
IntrusivePtr<BroType> t;
|
||||
char* name;
|
||||
char* access;
|
||||
int is_open; // whether the file is open in a general sense
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue