[svn:parrot] r43016 - trunk/src

chromatic chromatic at wgz.org
Sat Dec 12 18:39:46 UTC 2009


On Saturday 12 December 2009 at 04:51, mikehh  wrote:

> Log:
> fix src/pmc_freeze. for g++ build

> --- trunk/src/pmc_freeze.c	Sat Dec 12 12:22:54 2009	(r43015)
> +++ trunk/src/pmc_freeze.c	Sat Dec 12 12:51:51 2009	(r43016)
> @@ -339,7 +339,7 @@
>  {
>      ASSERT_ARGS(push_opcode_number)
>      UINTVAL   len    = PF_size_number() * sizeof (opcode_t);
> -    opcode_t *buffer = mem_sys_allocate(len);
> +    opcode_t *buffer = (opcode_t *)mem_sys_allocate(len);
>      opcode_t *ignore = PF_store_number(buffer, &v);
>      STRING   *number = Parrot_str_new_init(interp, (char *)buffer, len,
>          Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);

This could easily use mem_allocate_n_typed() instead, avoiding the cast and 
still satisfying the C++ compiler.

-- c 


More information about the parrot-dev mailing list