mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
([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:
parent
e51b3f9c60
commit
931eb3b58c
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue