Hello PARI-dev,
I have commited the second part of the code to handle closures.
(you need gp2c SVN r777 and pari SVN r12958).
The following features are implemented:
1) Support for functions using the prototype code E:
(the various intxxx routines, sumxxx routines, prodinf, solve, derivnum, direuler)
2) Basic support for functions using the prototype code I:
trap/forsubgroup/forell
with the limitation that the local variables from the parent scope are read-only.
3) Wrapper generation
GP2C can generate automatically wrapper for C closures in the usual PARI format:
GEN wrapper_xxx(void *context, GEN ...);
to use with functions like genapply/genselect that accept them.
Cheers,
Bill.