mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
harmonize function naming
This commit is contained in:
parent
35ac787cd8
commit
f03a8cae04
3 changed files with 5 additions and 5 deletions
|
@ -325,7 +325,7 @@ bool Ascii::DoUpdate()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Value* val = io->EntryToVal(stringfields[(*fit).position], (*fit).name, (*fit).type, (*fit).subtype);
|
Value* val = io->StringToVal(stringfields[(*fit).position], (*fit).name, (*fit).type, (*fit).subtype);
|
||||||
if ( val == 0 )
|
if ( val == 0 )
|
||||||
{
|
{
|
||||||
Error(Fmt("Could not convert line '%s' to Val. Ignoring line.", line.c_str()));
|
Error(Fmt("Could not convert line '%s' to Val. Ignoring line.", line.c_str()));
|
||||||
|
|
|
@ -179,7 +179,7 @@ bool AsciiInputOutput::ValToODesc(ODesc* desc, threading::Value* val, const thre
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
threading::Value* AsciiInputOutput::EntryToVal(string s, string name, TypeTag type, TypeTag subtype) const
|
threading::Value* AsciiInputOutput::StringToVal(string s, string name, TypeTag type, TypeTag subtype) const
|
||||||
{
|
{
|
||||||
if ( s.compare(unset_field) == 0 ) // field is not set...
|
if ( s.compare(unset_field) == 0 ) // field is not set...
|
||||||
return new threading::Value(type, false);
|
return new threading::Value(type, false);
|
||||||
|
@ -320,7 +320,7 @@ threading::Value* AsciiInputOutput::EntryToVal(string s, string name, TypeTag ty
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
threading::Value* newval = EntryToVal(element, name, subtype);
|
threading::Value* newval = StringToVal(element, name, subtype);
|
||||||
if ( newval == 0 )
|
if ( newval == 0 )
|
||||||
{
|
{
|
||||||
thread->Error("Error while reading set");
|
thread->Error("Error while reading set");
|
||||||
|
@ -337,7 +337,7 @@ threading::Value* AsciiInputOutput::EntryToVal(string s, string name, TypeTag ty
|
||||||
// to push an empty val on top of it.
|
// to push an empty val on top of it.
|
||||||
if ( s.empty() || *s.rbegin() == set_separator[0] )
|
if ( s.empty() || *s.rbegin() == set_separator[0] )
|
||||||
{
|
{
|
||||||
lvals[pos] = EntryToVal("", name, subtype);
|
lvals[pos] = StringToVal("", name, subtype);
|
||||||
if ( lvals[pos] == 0 )
|
if ( lvals[pos] == 0 )
|
||||||
{
|
{
|
||||||
thread->Error("Error while trying to add empty set element");
|
thread->Error("Error while trying to add empty set element");
|
||||||
|
|
|
@ -30,7 +30,7 @@ class AsciiInputOutput {
|
||||||
bool ValToODesc(ODesc* desc, threading::Value* val, const threading::Field* field) const;
|
bool ValToODesc(ODesc* desc, threading::Value* val, const threading::Field* field) const;
|
||||||
|
|
||||||
// convert the ascii representation of a field into a Value
|
// convert the ascii representation of a field into a Value
|
||||||
threading::Value* EntryToVal(string s, string name, TypeTag type, TypeTag subtype = TYPE_ERROR) const;
|
threading::Value* StringToVal(string s, string name, TypeTag type, TypeTag subtype = TYPE_ERROR) const;
|
||||||
|
|
||||||
/** Helper method to render an IP address as a string.
|
/** Helper method to render an IP address as a string.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue