Retain the object before returning it by reference. (Reported by
Richard Frith-Macdonald <richard@brainstorm.co.uk>.)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2307 72102866-910b-0410-8b05-ffd578937521
nameformatVersion:version]): Better commented.
([Decoder -_coderSubstituteObject:atReference:]): New method.
([Decoder -_coderPushRootObjectTable]): Better commented.
([Decoder -finishDecodingInterconnectedObjects]): Implement an
approach to root-object-based -awakeAfterUsingCoder.
([Decoder -decodeObjectAt:anObjPtr:name]): Send -awakeAfterUsingCoder:
here. First see if the object actually responds to it, then send it
and make the object substitution if necessary. Also make the
appropriate substitution in Decoder's internal tables matching
references numbers to objects.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1988 72102866-910b-0410-8b05-ffd578937521
assertion to inside conditional for FREF being true.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1502 72102866-910b-0410-8b05-ffd578937521
([Decoder -_coderCreateReferenceForObject:]): Add a debugging message.
([Decoder -_coderCreateReferenceForInterconnectedObject:]):
Autorelease the placeholder object.
([Decoder -_createReferenceBeforeInit]): New method. By default
return NO, for the GNU-style forward references.
([Decoder -decodeObjectAt:anObjPtr:name]): [CODER_OBJECT]: Use new
method; if it returns true, then we are using non-GNU, OpenStep-style
forward references. In this case: (1) don't try to decode the object by
sending +newWithCoder:, in fact, raise an error if the object wanted
to be decoded that way; (2) call _coderInternalCreateReferenceForObject
before sending -initWithCoder, not after; unfortunately this means
that -initWithCoder methods cannot substitute another object for self.
If it returns false, use the more robust GNU style forward references.
The NSGUnarchiver overrides this method to use the OpenStep style.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1480 72102866-910b-0410-8b05-ffd578937521
ANOBJPTR is NULL, and deal with it using a DUMMY_OBJECT local variable.
Remove CODER_OBJECT_FORWARD_SATISFIER case. In the CODER_OBJECT case,
decode the forward reference number, and deal with it appropriately.
See the ChangeLog comments for the Encoder changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1359 72102866-910b-0410-8b05-ffd578937521
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
Compare got with 6, not 2.
([Decoder -_coderCreateReferenceForObject:]): Add warning comment
about a -retain we don't want. Fix this eventually!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1058 72102866-910b-0410-8b05-ffd578937521