summaryrefslogtreecommitdiff
path: root/MLKRatio.m
diff options
context:
space:
mode:
Diffstat (limited to 'MLKRatio.m')
-rw-r--r--MLKRatio.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/MLKRatio.m b/MLKRatio.m
index a61d311..604b457 100644
--- a/MLKRatio.m
+++ b/MLKRatio.m
@@ -71,11 +71,12 @@
base:base]);
}
-#define DEFINE_MPQ_TWOARG_OPERATION(SELECTOR, GMPFUN) \
- DEFINE_GMP_OPERATION (SELECTOR (MLKRatio *)arg, \
- mpq, \
- GMPFUN (mpval, self->value, arg->value), \
- MLKRatio, \
+#define DEFINE_MPQ_TWOARG_OPERATION(SELECTOR, GMPFUN) \
+ DEFINE_GMP_OPERATION (SELECTOR (MLKNumber *)arg, \
+ mpq, \
+ GMPFUN (mpval, self->value, ((MLKRatio*)arg)->value), \
+ MLKNumber, \
+ MLKRatio, \
ratioWithMPQ:)
DEFINE_MPQ_TWOARG_OPERATION (add:, mpq_add)