[m-dev.] diff: making MR_memcpy work on void *, not char *
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Mar 26 19:42:12 AEDT 1999
On 26-Mar-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
>
> runtime/mercury_misc.[ch]:
> Make the arguments of MR_memcpy void * instead of char *, to make
> its signature agree with the signature of memcpy.
>
> runtime/mercury_array_macros.h:
> Update a cast in a call to MR_memcpy.
...
> --- mercury_array_macros.h 1999/02/08 10:51:43 1.3
> +++ mercury_array_macros.h 1999/03/24 06:18:02
> @@ -25,8 +25,8 @@
>
> #define MR_copy_array_element(array, to_index, from_index) \
> do { \
> - MR_memcpy((char *) &array[to_index], \
> - (const char *) &array[from_index], \
> + MR_memcpy((void *) &array[to_index], \
> + (const void *) &array[from_index], \
> sizeof(array[to_index])); \
> } while(0)
I think you should just get rid of the casts here, since they should
not be needed anymore.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list