Mercurial > hg > xemacs-beta
comparison src/number-mp.c @ 4802:2fc0e2f18322
Don't create any bignums before pdumping. Add bignum, ratio, and bigfloat
finalizers so we don't leak memory with NEW_GC. See xemacs-patches message
with ID <870180fe1001060900o46fa2b7o26b58850fadf9aba@mail.gmail.com>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Wed, 06 Jan 2010 10:01:14 -0700 |
parents | e567417c2e5d |
children | 16112448d484 |
comparison
equal
deleted
inserted
replaced
4801:591091481f20 | 4802:2fc0e2f18322 |
---|---|
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
14 for more details. | 14 for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with XEmacs; see the file COPYING. If not, write to | 17 along with XEmacs; see the file COPYING. If not, write to |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, |
19 Boston, MA 02111-1307, USA. */ | 19 Boston, MA 02111-1301, USA. */ |
20 | 20 |
21 /* Synched up with: Not in FSF. */ | 21 /* Synched up with: Not in FSF. */ |
22 | 22 |
23 #include <config.h> | 23 #include <config.h> |
24 #include <limits.h> | 24 #include <limits.h> |
219 neg = 1; | 219 neg = 1; |
220 } | 220 } |
221 | 221 |
222 mbase = MP_ITOM ((short) base); | 222 mbase = MP_ITOM ((short) base); |
223 MP_MOVE (bignum_zero, b); | 223 MP_MOVE (bignum_zero, b); |
224 | 224 |
225 for (digit = char_to_number (*s); digit >= 0 && digit < base; | 225 for (digit = char_to_number (*s); digit >= 0 && digit < base; |
226 digit = char_to_number (*++s)) | 226 digit = char_to_number (*++s)) |
227 { | 227 { |
228 MINT *temp; | 228 MINT *temp; |
229 | 229 |