TYPE_INT declaration

I just stumbled across this in src/bif_type.def. My understanding of the internal BRO type system is a bit fuzzy so I’m not 100% sure this is wrong – and I can’t point to anything that doesn’t work – but it sure doesn’t look right.

// DEFINE_BIF_TYPE(id, bif_type, bro_type, c_type, accessor, constructor)

DEFINE_BIF_TYPE(TYPE_INT, “int”, “int”, “bro_int_t”, “%s->AsInt()”, “new Val(%s, TYPE_BOOL)”)

Is there some reason why “new Val(%s, TYPE_BOOL)” is correct for the TYPE_INT constructor here?

(This is in master branch but has been like this since the beginning of the git repo.)



Sure looks like a typo, I just fixed it in master. Thanks!