([Encoder -_coderCreateReferenceForObject:]): Insert it in

object_2_xref, not const_ptr_2_xref.
([Encoder -_encodeObject:withName:isBycopy:isForwardReference:]):
Create the in_progress_table with NSNonOwnedPointerMapKeyCallBacks,
not NSObject..; needed by distributed objects so we don't get infinite
loop with proxy objects.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1059 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-03-06 14:09:15 +00:00
parent e51b3f9c60
commit 931eb3b58c

View file

@ -244,7 +244,7 @@ my_object_is_class(id object)
NSIntMapValueCallBacks, 0);
}
xref = NSCountMapTable (object_2_xref) + 1;
NSMapInsert (const_ptr_2_xref, anObj, (void*)xref);
NSMapInsert (object_2_xref, anObj, (void*)xref);
}
- (unsigned) _coderReferenceForObject: anObject
@ -623,7 +623,11 @@ my_object_is_class(id object)
/* Register the object as being in progress of encoding. */
if (!in_progress_table)
in_progress_table =
NSCreateMapTable (NSObjectMapKeyCallBacks,
/* This is "NonOwnedPointer", and not "Object", because
with "Object" we would get an infinite loop with distributed
objects when we try to put a Proxy in in the table, and
send the proxy the -hash method. */
NSCreateMapTable (NSNonOwnedPointerMapKeyCallBacks,
NSIntMapValueCallBacks, 0);
NSMapInsert (in_progress_table, anObj, (void*)1);