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
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-02-16 19:47:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-16 19:47:41 +0300
commitaefe9be5db3f767c343bae56eb49621a78b7d5b2 (patch)
tree528f363100f80b47f15d265a23499eae781dbe50 /intern
parented540dd1f17eb4e8e81068509ffc93933a548aef (diff)
[#18961] Use const char * where appropriate (2.5)
from Sean Bartell (wtachi) added own changes bpy_props.c
Diffstat (limited to 'intern')
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h2
-rw-r--r--intern/guardedalloc/intern/mallocn.c4
-rw-r--r--intern/guardedalloc/test/simpletest/memtest.c8
3 files changed, 10 insertions, 4 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index 7f1a66564a7..45c2e048df9 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -122,7 +122,7 @@ extern "C" {
void MEM_printmemlist_stats(void);
/** Set the callback function for error output. */
- void MEM_set_error_callback(void (*func)(char *));
+ void MEM_set_error_callback(void (*func)(const char *));
/**
* Are the start/end block markers still correct ?
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 677d756c8e6..806f8d183ba 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -135,7 +135,7 @@ static volatile uintptr_t mem_in_use= 0, mmap_in_use= 0;
static volatile struct localListBase _membase;
static volatile struct localListBase *membase = &_membase;
-static void (*error_callback)(char *) = NULL;
+static void (*error_callback)(const char *) = NULL;
static void (*thread_lock_callback)(void) = NULL;
static void (*thread_unlock_callback)(void) = NULL;
@@ -197,7 +197,7 @@ int MEM_check_memory_integrity()
}
-void MEM_set_error_callback(void (*func)(char *))
+void MEM_set_error_callback(void (*func)(const char *))
{
error_callback = func;
}
diff --git a/intern/guardedalloc/test/simpletest/memtest.c b/intern/guardedalloc/test/simpletest/memtest.c
index ec72b0f01e5..51f1f491894 100644
--- a/intern/guardedalloc/test/simpletest/memtest.c
+++ b/intern/guardedalloc/test/simpletest/memtest.c
@@ -47,6 +47,12 @@
#include <config.h>
#endif
+static void mem_error_cb(const char *errorStr)
+{
+ fprintf(stderr, "%s", errorStr);
+ fflush(stderr);
+}
+
int main (int argc, char *argv[])
{
int verbose = 0;
@@ -75,7 +81,7 @@ int main (int argc, char *argv[])
/* Round one, do a normal allocation, and free the blocks again. */
/* ----------------------------------------------------------------- */
/* flush mem lib output to stderr */
- MEM_set_error_callback(stderr);
+ MEM_set_error_callback(mem_error_cb);
for (i = 0; i < NUM_BLOCKS; i++) {
int blocksize = 10000;