[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49596] trunk/blender/source/blender/ blenlib: fix for building in debug mode.

Campbell Barton ideasman42 at gmail.com
Mon Aug 6 10:01:21 CEST 2012


Revision: 49596
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49596
Author:   campbellbarton
Date:     2012-08-06 08:01:20 +0000 (Mon, 06 Aug 2012)
Log Message:
-----------
fix for building in debug mode.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_stack.h
    trunk/blender/source/blender/blenlib/intern/stack.c

Modified: trunk/blender/source/blender/blenlib/BLI_stack.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_stack.h	2012-08-06 02:33:15 UTC (rev 49595)
+++ trunk/blender/source/blender/blenlib/BLI_stack.h	2012-08-06 08:01:20 UTC (rev 49596)
@@ -24,6 +24,10 @@
 #ifndef __BLI_STACK_H__
 #define __BLI_STACK_H__
 
+/** \file BLI_stack.h
+ *  \ingroup bli
+ */
+
 typedef struct BLI_Stack BLI_Stack;
 
 /* Create a new homogeneous stack with elements of 'elem_size' bytes */

Modified: trunk/blender/source/blender/blenlib/intern/stack.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/stack.c	2012-08-06 02:33:15 UTC (rev 49595)
+++ trunk/blender/source/blender/blenlib/intern/stack.c	2012-08-06 08:01:20 UTC (rev 49596)
@@ -21,10 +21,17 @@
  *
  */
 
-#include "BLI_stack.h"
+/** \file blender/blenlib/intern/stack.c
+ *  \ingroup bli
+ */
+
+#include <string.h>
+#include <stdlib.h>  /* abort() */
+
+#include "BLI_stack.h"  /* own include */
+
 #include "BLI_utildefines.h"
 #include "MEM_guardedalloc.h"
-#include <string.h>
 
 typedef struct BLI_Stack {
 	void *data;
@@ -55,7 +62,7 @@
 
 /* Gets the last element in the stack */
 #define STACK_LAST_ELEM(stack__) \
-	(((char*)(stack__)->data) + \
+	(((char *)(stack__)->data) + \
 	 ((stack__)->elem_size * ((stack__)->totelem - 1)))
 
 void BLI_stack_push(BLI_Stack *stack, void *src)
@@ -67,7 +74,7 @@
 			 * number of elements */
 			stack->maxelem = 32;
 			stack->data = MEM_mallocN((stack->elem_size *
-									   stack->maxelem), AT);
+			                           stack->maxelem), AT);
 		}
 		else {
 			/* Double stack size */
@@ -75,8 +82,8 @@
 			/* Check for overflow */
 			BLI_assert(maxelem > stack->maxelem);
 			stack->data = MEM_reallocN(stack->data,
-									   (stack->elem_size *
-										maxelem));
+			                           (stack->elem_size *
+			                            maxelem));
 			stack->maxelem = maxelem;
 		}
 	}




More information about the Bf-blender-cvs mailing list