zeek/src/script_opt/TempVar.cc
Jon Siwek fe8db7f150 Use string for TempVar::name
Nothing of consequence; just encapsulation of memory management
2021-01-13 13:49:32 -08:00

17 lines
347 B
C++

// See the file "COPYING" in the main distribution directory for copyright.
#include "zeek/script_opt/TempVar.h"
#include "zeek/Reporter.h"
namespace zeek::detail {
TempVar::TempVar(int num, const TypePtr& t, ExprPtr _rhs) : type(t)
{
char buf[8192];
snprintf(buf, sizeof buf, "#%d", num);
name = buf;
id = nullptr;
}
} // zeek::detail