mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
([Decoder -decodeObjectAt:anObjPtr:name]): Move CREATE_REF_BEFORE_INIT
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
This commit is contained in:
parent
07530e41bd
commit
76d3ea2f41
1 changed files with 7 additions and 6 deletions
|
@ -632,11 +632,6 @@ static int debug_coder = 0;
|
||||||
SEL init_sel = sel_get_any_uid("initWithCoder:");
|
SEL init_sel = sel_get_any_uid("initWithCoder:");
|
||||||
Method *init_method =
|
Method *init_method =
|
||||||
class_get_instance_method(object_class, init_sel);
|
class_get_instance_method(object_class, init_sel);
|
||||||
|
|
||||||
NSAssert (!create_ref_before_init,
|
|
||||||
@"You are trying to decode an object with the non-GNU"
|
|
||||||
@"OpenStep-style of forward references, but the object's"
|
|
||||||
@"decoding mechanism wants to use GNU features.");
|
|
||||||
/* xxx Or should I send +alloc? */
|
/* xxx Or should I send +alloc? */
|
||||||
*anObjPtr = (id) NSAllocateObject (object_class, 0, zone);
|
*anObjPtr = (id) NSAllocateObject (object_class, 0, zone);
|
||||||
if (create_ref_before_init)
|
if (create_ref_before_init)
|
||||||
|
@ -654,7 +649,13 @@ static int debug_coder = 0;
|
||||||
at: &fref
|
at: &fref
|
||||||
withName: NULL];
|
withName: NULL];
|
||||||
if (fref)
|
if (fref)
|
||||||
[self _coderSatisfyForwardReference: fref withObject: *anObjPtr];
|
{
|
||||||
|
NSAssert (!create_ref_before_init,
|
||||||
|
@"You are trying to decode an object with the non-GNU\n"
|
||||||
|
@"OpenStep-style forward references, but the object's\n"
|
||||||
|
@"decoding mechanism wants to use GNU features.");
|
||||||
|
[self _coderSatisfyForwardReference: fref withObject: *anObjPtr];
|
||||||
|
}
|
||||||
|
|
||||||
/* Would get error here with Connection-wide object references
|
/* Would get error here with Connection-wide object references
|
||||||
because addProxy gets called in +newRemote:connection: */
|
because addProxy gets called in +newRemote:connection: */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue