flintlib / calcium

Calcium has been merged into FLINT -- use https://github.com/flintlib/flint/ instead
http://fredrikj.net/calcium/
GNU Lesser General Public License v2.1
79 stars 11 forks source link

Changed pyca.fexpr.__call__ #27

Closed deinst closed 3 years ago

deinst commented 3 years ago

Pyca crashes on OSX when you attempt to call an fexpr with more than 4 parameters (this happens often in test_latex.py). I changed it so that the array of parameters is allocated on the python side. I don't think this should cause any problems, there does not seem to be any realloccing of the args in fexpr_call_vec().

The old dance with the array allocated in C crashed. Changed to use Python allocated array.

fredrik-johansson commented 3 years ago

Curious; I'd be interested in a "C-side" fix since there could be other instances where we need to use C-allocated vectors. But I'll be happy to accept this patch if it solves crashing.