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

2015-05-04 Thread Jochen Sprickerhof
* koneu kone...@googlemail.com [2015-04-23 21:09]: Careful though, arg.v is _not_ the address you want to pass to evascript(), *(arg.v) is! (or at least that's what the old code suggests) Yeah, I'm chaging the API here. But as eval() is not used in surf and the old version is broken, I don't

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

2015-04-23 Thread Jochen Sprickerhof
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*. Cheers Jochen signature.asc Description: Digital signature

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

2015-04-23 Thread Jason Woofenden
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

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

2015-04-23 Thread Jochen Sprickerhof
* Jason Woofenden ja...@jasonwoof.com [2015-04-23 14:36]: 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. True, the old one assumes a char** (an array of strings), whereas the new one assumes a

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

2015-04-23 Thread koneu
Jochen Sprickerhof wrote: * Jason Woofenden ja...@jasonwoof.com [2015-04-23 14:36]: 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. True, the old one assumes a char** (an array of strings),

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

2015-04-22 Thread Jason Woofenden
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(-)

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

2015-04-22 Thread Jochen Sprickerhof
--- 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 @@ -1314,7 +1314,7 @@ static void eval(Client *c, const Arg *arg) { WebKitWebFrame *frame = webkit_web_view_get_main_frame(c-view);

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

2015-04-22 Thread Jochen Sprickerhof
Actually, scratch this, I have no idea why I had this in my queue. Sorry for the noise. Cheers Jochen signature.asc Description: Digital signature