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

From: Jason Woofenden <jason_AT_jasonwoof.com>
Date: Thu, 23 Apr 2015 14:36:58 -0400

On 2015-04-23 08:06PM, Jochen Sprickerhof wrote:
> Ok, it does make sense, I had overlooked it because eval() is usually
> not called. The arg->v is passed to evalscript() which expects an char*.

Both implementations (before and after your patch) pass a char*.
But (assuming I'm reading the code correctly) they don't pass the
same address.

Below I've removed the typecasts to make the difference more
obvious.

Pre-patch, the old code is passing:

        arg-v[0]

which could also be written:

        *(arg->v)

and after the patch:

        arg->v

I just want to be clear that (as I read it anyway) this is not just
a semantic change, but it changes what the code does.

Sorry I don't know how to test this function to check which
behavior is correct.

-- 
Jason
Received on Thu Apr 23 2015 - 20:36:58 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 23 2015 - 20:48:07 CEST