summaryrefslogtreecommitdiff
path: root/gmp-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'gmp-impl.h')
-rw-r--r--gmp-impl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gmp-impl.h b/gmp-impl.h
index 7f807337a..689c91886 100644
--- a/gmp-impl.h
+++ b/gmp-impl.h
@@ -677,6 +677,19 @@ __GMP_DECLSPEC void __gmp_tmp_debug_free (const char *, int, int,
(y) = __mpz_srcptr_swap__tmp; \
} while (0)
+#define MPQ_PTR_SWAP(x, y) \
+ do { \
+ mpq_ptr __mpq_ptr_swap__tmp = (x); \
+ (x) = (y); \
+ (y) = __mpq_ptr_swap__tmp; \
+ } while (0)
+#define MPQ_SRCPTR_SWAP(x, y) \
+ do { \
+ mpq_srcptr __mpq_srcptr_swap__tmp = (x); \
+ (x) = (y); \
+ (y) = __mpq_srcptr_swap__tmp; \
+ } while (0)
+
/* Enhancement: __gmp_allocate_func could have "__attribute__ ((malloc))",
but current gcc (3.0) doesn't seem to support that. */