Avoid a copy in gdb_mpz::safe_export
authorTom Tromey <tromey@adacore.com>
Wed, 1 Mar 2023 19:33:27 +0000 (12:33 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 27 Mar 2023 14:20:29 +0000 (08:20 -0600)
commitc7c3708ac778625d3a87aad541de5f0666acbcc5
tree4130dbcad187159564716bfa2b2ac534aaec651c
parentc225d6b80413d373c84f743b2c4e9b4851ff82dc
Avoid a copy in gdb_mpz::safe_export

Currently, gdb_mpz::safe_export will always make a copy of *this.
However, this copy isn't always needed.  This patch makes this code
slightly more efficient, by avoiding the copy when possible.
gdb/gmp-utils.c