Avoid using _ecl_big_register_normalize() in alloc_2.d
authorJuan Jose Garcia Ripoll <jjgarcia@jjgr-2.local>
Sun, 7 Feb 2010 22:22:26 +0000 (23:22 +0100)
committerJuan Jose Garcia Ripoll <jjgarcia@jjgr-2.local>
Sun, 7 Feb 2010 22:22:26 +0000 (23:22 +0100)
src/c/alloc_2.d

index bb9bb54..c277d1d 100755 (executable)
@@ -1191,10 +1191,13 @@ si_gc_stats(cl_object enable)
                mpz_init2(cl_core.gc_counter->big.big_num, 128);
 #endif
        } else {
-                size1 = _ecl_big_register_normalize(cl_core.bytes_consed);
-                size2 = _ecl_big_register_normalize(cl_core.gc_counter);
+                /* We need fresh copies of the bignums */
+                size1 = _ecl_big_plus_fix(cl_core.bytes_consed, 1);
+                size2 = _ecl_big_plus_fix(cl_core.gc_counter, 1);
+#ifdef WITH_GMP
                 mpz_set_ui(cl_core.bytes_consed->big.big_num, 0);
                 mpz_set_ui(cl_core.gc_counter->big.big_num, 0);
+#endif
         }
        @(return size1 size2 old_status)
 }