[Bro-Dev] enums in modules

Robin Sommer robin at icir.org
Sat Jan 22 14:18:54 PST 2011


On Thu, Jan 20, 2011 at 16:50 -0500, you wrote:

> function logging_log%(id: Logging::ID, rec: any%): bool

Would be nice if that worked. Seems like something we should fix
eventually.

I'm actually not quite sure to which degree enums are supported by
bifcl right now. Two things you could try: (1) do they work if they
don't have namespace?; and (2) does it work to say just ":enum"
(probably not).

The alternative would be to use "any" and check for the type's
correctness dynamically inside the function body until we have fixed
this.

(The other work-around is using strings, as I think you said you are
alrady doing now) .

Robin

-- 
Robin Sommer * Phone +1 (510) 722-6541 * robin at icir.org
ICSI/LBNL    * Fax   +1 (510) 666-2956 *   www.icir.org


More information about the bro-dev mailing list