use size_t for MEM_allocN_len as well as some of its callers
authorCampbell Barton <ideasman42@gmail.com>
Thu, 29 Apr 2010 21:46:25 +0000 (21:46 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 29 Apr 2010 21:46:25 +0000 (21:46 +0000)
intern/guardedalloc/MEM_guardedalloc.h
intern/guardedalloc/intern/mallocn.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenloader/intern/readfile.c

index edc02cee403a5a259a8f7b6915b4027c95838b51..705f099ab63a70e0c927509f3b3451f0123c2224 100644 (file)
@@ -66,7 +66,7 @@ extern "C" {
        /** Returns the lenght of the allocated memory segment pointed at
         * by vmemh. If the pointer was not previously allocated by this
         * module, the result is undefined.*/
-       int MEM_allocN_len(void *vmemh);
+       size_t MEM_allocN_len(void *vmemh);
 
        /**
         * Release memory previously allocatred by this module. 
index 2e7faf8aac1f360f8146cb4d728676d68d8d0bfa..9f2f57e119c3e3529e350e219a4e947c02e6e874 100644 (file)
@@ -220,7 +220,7 @@ void MEM_set_memory_debug(void)
        malloc_debug_memset= 1;
 }
 
-int MEM_allocN_len(void *vmemh)
+size_t MEM_allocN_len(void *vmemh)
 {
        if (vmemh) {
                MemHead *memh= vmemh;
index cfee7dd9f61a096c9a974ac5a79c7ea5aecf4893..1381a3b19dd852180b040e7b07b172026d8e78a9 100644 (file)
@@ -650,7 +650,7 @@ void *copy_libblock(void *rt)
        ID *idn, *id;
        ListBase *lb;
        char *cp, *cpn;
-       int idn_len;
+       size_t idn_len;
        
        id= rt;
 
index 9b3c613aef2eb874406faa9c485fd56f099c55b7..22cdf7d7f2b6f69352c614e1cd164b60d383b936 100644 (file)
@@ -586,7 +586,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq)
 
        if (seq->type == SEQ_IMAGE) {
                /* Hack? */
-               int olen = MEM_allocN_len(seq->strip->stripdata)/sizeof(struct StripElem);
+               size_t olen = MEM_allocN_len(seq->strip->stripdata)/sizeof(struct StripElem);
                seq->len = olen;
                seq->len -= seq->anim_startofs;
                seq->len -= seq->anim_endofs;
index f7dcbee79be9d3d9cad1fc720b41f2e0fceddf10..74cf3e0c479bb1f70832619834233cb2cd79b4c2 100644 (file)
@@ -1357,7 +1357,8 @@ static void test_pointer_array(FileData *fd, void **mat)
 #else
        long long *lpoin, *lmat;
 #endif
-       int len, *ipoin, *imat;
+       int *ipoin, *imat;
+       size_t len;
 
                /* manually convert the pointer array in
                 * the old dna format to a pointer array in