diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2008-01-16 19:20:21 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2008-01-16 19:20:21 (GMT) |
commit | fc90c25edfba404f54319eaeeacca39246f95c9e (patch) | |
tree | 78bac4e928b25e139605aceefa82537f378d8af0 /src/marshal.cpp | |
parent | f57b7d974fec18d1d8f325c102efd8be5930131d (diff) | |
download | Doxygen-fc90c25edfba404f54319eaeeacca39246f95c9e.zip Doxygen-fc90c25edfba404f54319eaeeacca39246f95c9e.tar.gz Doxygen-fc90c25edfba404f54319eaeeacca39246f95c9e.tar.bz2 |
Release-1.5.4
Diffstat (limited to 'src/marshal.cpp')
-rw-r--r-- | src/marshal.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/marshal.cpp b/src/marshal.cpp index a11a25f..a032a64 100644 --- a/src/marshal.cpp +++ b/src/marshal.cpp @@ -301,7 +301,17 @@ void marshalMemberList(StorageIntf *s,MemberList *ml) } else { - marshalUInt(s,1); // not a null pointer + marshalUInt(s,ml->count()); + MemberListIterator mli(*ml); + MemberDef *md; + uint count=0; + for (mli.toFirst();(md=mli.current());++mli) + { + marshalObjPointer(s,md); + count++; + } + assert(count==ml->count()); + ml->marshal(s); } } @@ -690,11 +700,18 @@ GroupList *unmarshalGroupList(StorageIntf *s) MemberList *unmarshalMemberList(StorageIntf *s) { + uint i; uint count = unmarshalUInt(s); if (count==NULL_LIST) return 0; - MemberList *ml = new MemberList; - ml->unmarshal(s); - return ml; + MemberList *result = new MemberList; + assert(count<1000000); + for (i=0;i<count;i++) + { + MemberDef *md = (MemberDef*)unmarshalObjPointer(s); + result->append(md); + } + result->unmarshal(s); + return result; } ExampleSDict *unmarshalExampleSDict(StorageIntf *s) |