Skip to content
Back to formatted view

Raw Message

Message-ID: <4B047F97.30304@stats.uwo.ca>
Date: 2009-11-18T23:13:27Z
From: Duncan Murdoch
Subject: Unnecesary code?
In-Reply-To: <20091118211548.327E32803F@smtp.hushmail.com>

hunsyntesat at hush.com wrote:
> Dear R-ers,
>
> While browsing the R sources, I found the following piece of code 
> in src\main\memory.c:
>
> static void reset_pp_stack(void *data)
> {
>     R_size_t *poldpps = data;
>     R_PPStackSize =  *poldpps;
> }
>
> To me, it looks like the poldpps pointer is a nuissance; can't you 
> just cast the data pointer and derefer it at once? Say,
>
> static void reset_pp_stack(void *data)
> {
>     R_PPStackSize = * (R_size_t *) data;
> }
>   
What would you gain by this change?

Duncan Murdoch