use size_t for MEM_allocN_len as well as some of its callers

This commit is contained in:
Campbell Barton 2010-04-29 21:46:25 +00:00
parent d2f5a60ca2
commit 5e74542bb6
5 changed files with 6 additions and 5 deletions

@ -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.

@ -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;

@ -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;

@ -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;

@ -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