Make pass-by-reference explicit by using pointers
commit8528f0700bcb25ba5e57791677e510e0ee5a659a
authorMichael Kruse <isl@meinersbur.de>
Tue, 26 May 2015 13:02:33 +0000 (26 15:02 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 15 Jun 2015 08:00:03 +0000 (15 10:00 +0200)
tree2f329d88100b019dab17c113153e7cd4e354359b
parent2c1b68581916666fb2bcc94c7bf8779807ed42d9
Make pass-by-reference explicit by using pointers

GMP's mpz_t automatically decays to pointer and IMath's mp_int is a
pointer, therefore changing them in a function body always also changes
the argument of the function's caller. With an isl_int implementation
without pointer semantics this wouldn't be the case and the value
change not visible outside of the function.

The parameters a, b and g of isl_int_gcdext are output-parameters, so
their return values must be visible to the function's caller. We change
them to pointers to make the by-reference explicit.

Signed-off-by: Michael Kruse <isl@meinersbur.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_val.c