mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
Fixed ASSIGN macro from NSObject.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3479 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9104a852b4
commit
b824752830
1 changed files with 11 additions and 9 deletions
|
@ -65,15 +65,17 @@
|
|||
#ifndef ASSIGN
|
||||
#define ASSIGN(object,value) ({\
|
||||
if (value != object) \
|
||||
if (value) \
|
||||
{ \
|
||||
[value retain]; \
|
||||
} \
|
||||
if (object) \
|
||||
{ \
|
||||
[object release]; \
|
||||
} \
|
||||
object = value; \
|
||||
{ \
|
||||
if (value) \
|
||||
{ \
|
||||
[value retain]; \
|
||||
} \
|
||||
if (object) \
|
||||
{ \
|
||||
[object release]; \
|
||||
} \
|
||||
object = value; \
|
||||
} \
|
||||
})
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue