mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Changes to make declared types track their identifier.
Only occurs when in documentation mode.
This commit is contained in:
parent
1bad6e3a95
commit
1c962cbb89
3 changed files with 51 additions and 5 deletions
|
@ -10,6 +10,8 @@
|
|||
#include "Scope.h"
|
||||
#include "Serializer.h"
|
||||
|
||||
extern int generate_documentation;
|
||||
|
||||
const char* type_name(TypeTag t)
|
||||
{
|
||||
static char errbuf[512];
|
||||
|
@ -44,6 +46,7 @@ BroType::BroType(TypeTag t, bool arg_base_type)
|
|||
tag = t;
|
||||
is_network_order = 0;
|
||||
base_type = arg_base_type;
|
||||
type_id = 0;
|
||||
|
||||
switch ( tag ) {
|
||||
case TYPE_VOID:
|
||||
|
@ -195,8 +198,9 @@ BroType* BroType::Unserialize(UnserialInfo* info, TypeTag want)
|
|||
if ( ! t )
|
||||
return 0;
|
||||
|
||||
// For base types, we return our current instance.
|
||||
if ( t->base_type )
|
||||
// For base types, we return our current instance
|
||||
// if not in "documentation mode".
|
||||
if ( t->base_type && ! generate_documentation )
|
||||
{
|
||||
BroType* t2 = ::base_type(TypeTag(t->tag));
|
||||
Unref(t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue