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), whereas the
> new one assumes a char*, i.e., string. As evascript() later only accepts
> one char*, it doesn't make sense to put it behind an other layer of
> indirection into the arg->v.
> 
> Cheers Jochen

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)

On a side note, I never really understood why all suckless projects pass
their arg unions by reference. It's a goddamn union, pass it by value!

Reply via email to