[Bro-Dev] TYPE_INT declaration

Jeff Barber jbarber at computer.org
Tue Jun 7 07:45:01 PDT 2016

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.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.icsi.berkeley.edu/pipermail/bro-dev/attachments/20160607/93ef747f/attachment.html 

More information about the bro-dev mailing list