+2005-03-07 Helge Hess <helge.hess@opengroupware.org>
+
+ * NGExtensions/NGObjectMacros.h: fixed ASSIGN, ASSIGNCOPY macros to
+ avoid an unset LHS as requested by Stephane (v4.5.155)
+
2005-03-02 Marcus Mueller <znek@mulle-kybernetik.com>
* NGCalendarDateRange.m: Bugfix for -containsDate: (v4.5.154)
# define ASSIGN(object, value) \
({id __object = (id)object; \
id __value = (id)value; \
- if (__value != __object) { if (__value) [__value retain]; \
- if (__object) [__object release]; \
- object = __value;}})
+ if (__value != __object) { \
+ object = (__value) ? [__value retain] : nil; \
+ if (__object) [__object release]; \
+ }})
#endif
#ifndef ASSIGNCOPY
# define ASSIGNCOPY(object, value) \
({id __object = (id)object; \
id __value = (id)value; \
- if (__value != __object) { if (__value) __value = [__value copy]; \
- if (__object) [__object release]; \
- object = __value;}})
+ if (__value != __object) { \
+ object = __value ? [__value copy] : nil; \
+ if (__object) [__object release]; \
+ }})
#endif
#ifndef RETAIN
# define RETAIN(__XXX__) [__XXX__ retain]