Subject Re: UDF problem
Author kittikira
Still the same message from the compiler after changing malloc to ib_util_malloc.

I have some UDFs, that work with strings and there I use

char * returnstr = (char * ) malloc(31);

to allocate memory.

After reading your post, I tried to change that into

char * returnstr = (char * ) ib_util_malloc(31);

and then I also get the message from the compiler:

warning: cast to pointer from integer of different size

I do not get any warning if I use malloc to allocate the memory for the string.

For ISC_QUAD i always get the warning, no matter if I use malloc or ib_util_malloc.

--- In, Dimitry Sibiryakov <sd@...> wrote:
> 25.01.2010 13:26, kittikira wrote:
> > Could anyone tell me what is the correct command to alocate the memory?
> ib_util_malloc() if you are going to return the pointer to engine. If
> you free the memory in the same routine, you can use any allocation method.
> --
> SY, SD.