Hi Tobias,
Instead of using the return "size" value directly, the code converted it first to an int and then back into a GMP number. This patch now directly uses the mpz value.Additionally, I added range checks - to print the proper function name (SHAPE instead of SIZE), I split the worker code from the checking code. Build and regtested on x86-64-gnu-linux. OK for the trunk and the 4.7/4.8 branches?
OK for all. Thanks for the patch! Thomas