mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
(Encoder fref_counter): New ivar for guaranteeing that forward
references have unique names. Previous use of the MapTable count for this purpose didn't work because we occasionally removed elements from the table, and thus had aliased forward reference numbers. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1354 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4e25d2ffb4
commit
a6084ea9ae
2 changed files with 8 additions and 6 deletions
|
@ -56,9 +56,10 @@
|
|||
/* xxx in_progress_table should actually be an NSHashTable,
|
||||
but we are working around a bug right now. */
|
||||
NSMapTable *in_progress_table; /* objects begun writing, but !finished */
|
||||
NSMapTable *object_2_xref; /* objects already written */
|
||||
NSMapTable *object_2_fref; /* table of forward references */
|
||||
NSMapTable *const_ptr_2_xref; /* const pointers already written */
|
||||
NSMapTable *object_2_xref; /* objects already written */
|
||||
NSMapTable *object_2_fref; /* table of forward references */
|
||||
NSMapTable *const_ptr_2_xref; /* const pointers already written */
|
||||
unsigned fref_counter; /* Keep track of unused fref numbers */
|
||||
}
|
||||
|
||||
- initForWritingToFile: (id <String>) filename;
|
||||
|
|
|
@ -56,9 +56,10 @@
|
|||
/* xxx in_progress_table should actually be an NSHashTable,
|
||||
but we are working around a bug right now. */
|
||||
NSMapTable *in_progress_table; /* objects begun writing, but !finished */
|
||||
NSMapTable *object_2_xref; /* objects already written */
|
||||
NSMapTable *object_2_fref; /* table of forward references */
|
||||
NSMapTable *const_ptr_2_xref; /* const pointers already written */
|
||||
NSMapTable *object_2_xref; /* objects already written */
|
||||
NSMapTable *object_2_fref; /* table of forward references */
|
||||
NSMapTable *const_ptr_2_xref; /* const pointers already written */
|
||||
unsigned fref_counter; /* Keep track of unused fref numbers */
|
||||
}
|
||||
|
||||
- initForWritingToFile: (id <String>) filename;
|
||||
|
|
Loading…
Reference in a new issue