diff options
Diffstat (limited to 'mpz/swap.c')
-rw-r--r-- | mpz/swap.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/mpz/swap.c b/mpz/swap.c index de8195a7d..7883ce6d2 100644 --- a/mpz/swap.c +++ b/mpz/swap.c @@ -27,18 +27,18 @@ mpz_swap (mpz_ptr u, mpz_ptr v) __GMP_NOTHROW mp_size_t usize, vsize; mp_size_t ualloc, valloc; - ualloc = u->_mp_alloc; - valloc = v->_mp_alloc; - v->_mp_alloc = ualloc; - u->_mp_alloc = valloc; - - usize = u->_mp_size; - vsize = v->_mp_size; - v->_mp_size = usize; - u->_mp_size = vsize; - - up = u->_mp_d; - vp = v->_mp_d; - v->_mp_d = up; - u->_mp_d = vp; + ualloc = ALLOC (u); + valloc = ALLOC (v); + ALLOC (v) = ualloc; + ALLOC (u) = valloc; + + usize = SIZ (u); + vsize = SIZ (v); + SIZ (v) = usize; + SIZ (u) = vsize; + + up = PTR (u); + vp = PTR (v); + PTR (v) = up; + PTR (u) = vp; } |