diff options
Diffstat (limited to 'MLKInteger.m')
-rw-r--r-- | MLKInteger.m | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/MLKInteger.m b/MLKInteger.m index 8823aa6..345235a 100644 --- a/MLKInteger.m +++ b/MLKInteger.m @@ -69,11 +69,12 @@ } -#define DEFINE_MPZ_TWOARG_OPERATION(SELECTOR, GMPFUN) \ - DEFINE_GMP_OPERATION (SELECTOR (MLKInteger *)arg, \ - mpz, \ - GMPFUN (mpval, self->value, arg->value), \ - MLKInteger, \ +#define DEFINE_MPZ_TWOARG_OPERATION(SELECTOR, GMPFUN) \ + DEFINE_GMP_OPERATION (SELECTOR (MLKNumber *)arg, \ + mpz, \ + GMPFUN (mpval, self->value, ((MLKInteger*)arg)->value), \ + MLKNumber, \ + MLKInteger, \ integerWithMPZ:) DEFINE_MPZ_TWOARG_OPERATION (add:, mpz_add) |