mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Merge branch 'fastpath' of git://git.bro-ids.org/bro into fastpath
This commit is contained in:
commit
d6da8365f5
3 changed files with 13 additions and 2 deletions
|
@ -74,7 +74,7 @@ public:
|
||||||
struct ReaderInfo
|
struct ReaderInfo
|
||||||
{
|
{
|
||||||
// Structure takes ownership of the strings.
|
// Structure takes ownership of the strings.
|
||||||
typedef std::map<const char*, const char*> config_map;
|
typedef std::map<const char*, const char*, CompareString> config_map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A string left to the interpretation of the reader
|
* A string left to the interpretation of the reader
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
struct WriterInfo
|
struct WriterInfo
|
||||||
{
|
{
|
||||||
// Structure takes ownership of these strings.
|
// Structure takes ownership of these strings.
|
||||||
typedef std::map<const char*, const char*> config_map;
|
typedef std::map<const char*, const char*, CompareString> config_map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A string left to the interpretation of the writer
|
* A string left to the interpretation of the writer
|
||||||
|
|
11
src/util.h
11
src/util.h
|
@ -345,4 +345,15 @@ inline int safe_vsnprintf(char* str, size_t size, const char* format, va_list al
|
||||||
extern void get_memory_usage(unsigned int* total,
|
extern void get_memory_usage(unsigned int* total,
|
||||||
unsigned int* malloced);
|
unsigned int* malloced);
|
||||||
|
|
||||||
|
// class to be used as a third argument for stl maps to be able to use
|
||||||
|
// char*'s as keys. Otherwise the pointer values will be compared instead
|
||||||
|
// of the actual string values.
|
||||||
|
struct CompareString
|
||||||
|
{
|
||||||
|
bool operator()(char const *a, char const *b) const
|
||||||
|
{
|
||||||
|
return std::strcmp(a, b) < 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue