X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?p=polintos%2Fscott%2Fpriv.git;a=blobdiff_plain;f=idlcomp%2Fidlc.h;fp=idlcomp%2Fidlc.h;h=e030bbe52ba5dc355b0068c2f9bb5293c249c5e4;hp=651fae653592a0b42ae6b48f9538f7eeed99fca6;hb=39d6852ead7a839f9e15e21e517dfd7a795e5cdd;hpb=cc1bee96fd874ff2c85c765f81ec2f4ba4584b9d diff --git a/idlcomp/idlc.h b/idlcomp/idlc.h index 651fae6..e030bbe 100644 --- a/idlcomp/idlc.h +++ b/idlcomp/idlc.h @@ -456,6 +456,14 @@ extern int traversal; class Symbol : public RefCountable { NameSpace *ns; + void init() + { + ns = NULL; + external = false; + priv = false; + lang_priv = NULL; + } + public: StringRef name; @@ -470,19 +478,12 @@ public: bool priv; - // This is set to ::traversal when this symbol is visited along a chain. - // If a target needs more than 8 simultaneous chains, increase the size - // of the array. These traversals are reserved for language binding use. - - int traversed[8]; + // Reserved for language binding use. + Releasable *lang_priv; Symbol() { - ns = NULL; - external = false; - priv = false; - - memset(traversed, 0, sizeof(traversed)); + init(); } Symbol(const String *_name) : name(_name) @@ -490,11 +491,7 @@ public: if (_name) name->retain(); - ns = NULL; - external = false; - priv = false; - - memset(traversed, 0, sizeof(traversed)); + init(); } virtual ~Symbol(); @@ -1292,6 +1289,9 @@ class Struct : public NameSpace, public Type, public Def { SymbolRef supersym; StrListRef supername; bool attrs_resolved; + + // 0 = unknown, 1 = yes, 2 = no + int plain_data; void add_elem(Datum *d); @@ -1465,6 +1465,10 @@ public: def.guid[0] = guid[0]; def.guid[1] = guid[1]; } + + // A struct is "plain data" if it contains no object references, + // no non-inline arrays or structs, and no inline non-plain structs. + bool is_plain_data(); }; class Param : public Symbol, public Def {