[Bf-blender-cvs] [f54e358] master: some systems didnt define NULL

Campbell Barton noreply at git.blender.org
Fri Feb 7 22:11:32 CET 2014


Commit: f54e3589a45fa25479050e272abc8f386b8634df
Author: Campbell Barton
Date:   Sat Feb 8 08:09:49 2014 +1100
https://developer.blender.org/rBf54e3589a45fa25479050e272abc8f386b8634df

some systems didnt define NULL

===================================================================

M	source/blender/blenlib/BLI_listbase.h

===================================================================

diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h
index 7749092..a54fa15 100644
--- a/source/blender/blenlib/BLI_listbase.h
+++ b/source/blender/blenlib/BLI_listbase.h
@@ -81,8 +81,8 @@ void BLI_rotatelist_last(struct ListBase *lb, void *vlink);
  * Utility functions to avoid first/last references inline all over.
  */
 BLI_INLINE bool BLI_listbase_is_single(const struct ListBase *lb) { return (lb->first && lb->first == lb->last); }
-BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb) { return (lb->first == NULL); }
-BLI_INLINE void BLI_listbase_clear(struct ListBase *lb) { lb->first = lb->last = NULL; }
+BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb) { return (lb->first == (void *)0); }
+BLI_INLINE void BLI_listbase_clear(struct ListBase *lb) { lb->first = lb->last = (void *)0; }
 
 /* create a generic list node containing link to provided data */
 struct LinkData *BLI_genericNodeN(void *data);




More information about the Bf-blender-cvs mailing list