Re: [dev] [surf] [PATCH] Simplify eval arg handling

From: Jason Woofenden <jason_AT_jasonwoof.com>
Date: Wed, 22 Apr 2015 12:16:13 -0400

This is making my brain hurt, but I'm pretty sure this change
dereferences arg->v one fewer times.

Does arg->v point directly to a string, or to a pointer to a
string?

-- 
Jason
On 2015-04-22 05:30PM, Jochen Sprickerhof wrote:
> ---
>  surf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/surf.c b/surf.c
> index 87c10ef..75fa5db 100644
> --- a/surf.c
> +++ b/surf.c
> _AT_@ -1314,7 +1314,7 @@ static void
>  eval(Client *c, const Arg *arg) {
>  	WebKitWebFrame *frame = webkit_web_view_get_main_frame(c->view);
>  	evalscript(webkit_web_frame_get_global_context(frame),
> -			((char **)arg->v)[0], "");
> +			(char *)arg->v, "");
>  }
>  
>  static void
> -- 
> 2.1.4
> 
Received on Wed Apr 22 2015 - 18:16:13 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 22 2015 - 18:24:08 CEST