Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-17 04:52:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-17 04:52:36 +0400
commitad96dacbc5a7cc61ccf74405927847f243a955b5 (patch)
treea2b78d3b502b99a1c7e59e8400dfd0807a896125 /source/blender/blenlib/intern/BLI_memarena.c
parent9276fb479ed1c5b472c5d831f52913157efe9288 (diff)
style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_memarena.c')
-rw-r--r--source/blender/blenlib/intern/BLI_memarena.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/BLI_memarena.c b/source/blender/blenlib/intern/BLI_memarena.c
index 308fc6a61e6..4debe1a4b04 100644
--- a/source/blender/blenlib/intern/BLI_memarena.c
+++ b/source/blender/blenlib/intern/BLI_memarena.c
@@ -48,7 +48,8 @@ struct MemArena {
LinkNode *bufs;
};
-MemArena *BLI_memarena_new(int bufsize, const char *name) {
+MemArena *BLI_memarena_new(int bufsize, const char *name)
+{
MemArena *ma= MEM_callocN(sizeof(*ma), "memarena");
ma->bufsize= bufsize;
ma->align = 8;
@@ -57,20 +58,24 @@ MemArena *BLI_memarena_new(int bufsize, const char *name) {
return ma;
}
-void BLI_memarena_use_calloc(MemArena *ma) {
+void BLI_memarena_use_calloc(MemArena *ma)
+{
ma->use_calloc= 1;
}
-void BLI_memarena_use_malloc(MemArena *ma) {
+void BLI_memarena_use_malloc(MemArena *ma)
+{
ma->use_calloc= 0;
}
-void BLI_memarena_use_align(struct MemArena *ma, int align) {
+void BLI_memarena_use_align(struct MemArena *ma, int align)
+{
/* align should be a power of two */
ma->align = align;
}
-void BLI_memarena_free(MemArena *ma) {
+void BLI_memarena_free(MemArena *ma)
+{
BLI_linklist_free(ma->bufs, (void(*)(void*)) MEM_freeN);
MEM_freeN(ma);
}
@@ -78,7 +83,8 @@ void BLI_memarena_free(MemArena *ma) {
/* amt must be power of two */
#define PADUP(num, amt) ((num+(amt-1))&~(amt-1))
-void *BLI_memarena_alloc(MemArena *ma, int size) {
+void *BLI_memarena_alloc(MemArena *ma, int size)
+{
void *ptr;
/* ensure proper alignment by rounding