yara
yara copied to clipboard
Common word 'parent' defined in header
This: https://github.com/VirusTotal/yara/blob/master/libyara/include/yara/modules.h#L214
makes Yara unusable in any project that has functions/methods/etc named parent
which seems quite common.
It does break my own project since I have methods named that way. I have to patch Yara to use it.
Same problem here, Yara headers break dependent projects.
Possible solutions to this:
- Rename the macro to something less common.
- Prefix macros with
yara_
. - Make a hard separation between public and private headers. Include a common header with
#undef
s at the end of every public header.
~~Note that another macro, module
, is a reserved keyword from C++20 onwards:
https://github.com/VirusTotal/yara/blob/master/libyara/include/yara/modules.h#L213~~
EDIT: Already tracked at: https://github.com/VirusTotal/yara/issues/1493