The original code looks right to me.
You have taken the generic function and the associated foreign vector
methods #'permute and gratuitously renamed them #'permute-vector,
leaving the method for raw C pointer with the original name and no
generic function. Then you completely delete the generic function and
vector methods for #'permute-inverse for no apparent reason, leaving a
method for the raw C pointer only.
There is no duplicated code here. There is certainly the equivalent of
gsl_permute_vector, it is the GRID:VECTOR-DOUBLE-FLOAT (second arg)
method of #'permute (which you renamed).
I recommend macroexpansion as a way of seeing what's being defined. If
you use emacs, place the cursor on the defmfun line and do C-c C-m.
Then you will see all the generic functions and methods, and you will
see there is no error in the original code.
On Tue, Nov 24, 2015 at 5:43 PM, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
> Because of a typo, GSLL did not have the equivalent of GSL_PERMUTE_VECTOR.
>
> There was also a section of duplicated code.
>
> This patch should fix these errors.
>
> NOTE: I did not test this patch - My GSLL system is not behaving
> super-cleanly on MSYS2 and GSL2.1. Proceed with care.
>
> Mirko