mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-19 12:01:44 +00:00
([Decoder -_coderSatisfyForwardReference:withObject:]): Create
fref_2_object with NSNonOwnedPointerMapValueCallBacks, not NSObjectMapValueCallBacks. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1350 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
caf331e0e6
commit
38b8b74f50
1 changed files with 6 additions and 1 deletions
|
@ -234,8 +234,13 @@
|
||||||
{
|
{
|
||||||
assert (address_2_fref);
|
assert (address_2_fref);
|
||||||
if (!fref_2_object)
|
if (!fref_2_object)
|
||||||
|
/* xxx Or should this be NSObjectMapValueCallBacks, so we make
|
||||||
|
sure the object doesn't get released before we can resolve
|
||||||
|
references with it? */
|
||||||
fref_2_object = NSCreateMapTable (NSIntMapKeyCallBacks,
|
fref_2_object = NSCreateMapTable (NSIntMapKeyCallBacks,
|
||||||
NSObjectMapValueCallBacks, 0);
|
NSNonOwnedPointerMapValueCallBacks, 0);
|
||||||
|
/* There should only be one object for each fref. */
|
||||||
|
assert (!NSMapGet (fref_2_object, (void*)fref));
|
||||||
NSMapInsert (fref_2_object, (void*)fref, anObj);
|
NSMapInsert (fref_2_object, (void*)fref, anObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue