Index: factory/fac_cantzass.cc
===================================================================
--- factory/fac_cantzass.cc	(revision d67fcad45b24dac7faa0f1b23dc90bec67b9de70)
+++ factory/fac_cantzass.cc	(revision a522916a7e6a9455b8b3b069cf64a8a507a5247f)
@@ -19,5 +19,5 @@
 static CFFList CantorZassenhausFactorFFGF( const CanonicalForm & f, int d, int q, const CFRandom & );
 
-static CFFList CantorZassenhausFactorExt( const CanonicalForm & g, int s, MP_INT * q, const CFRandom & gen );
+static CFFList CantorZassenhausFactorExt( const CanonicalForm & g, int s, mpz_t q, const CFRandom & gen );
 
 static CFFList distinctDegreeFactorFFGF ( const CanonicalForm & f, int q );
@@ -37,5 +37,5 @@
 static CanonicalForm powerMod2( const CanonicalForm & f, int p, int s, const CanonicalForm & d );
 
-static CanonicalForm powerMod2( const CanonicalForm & f, MP_INT * q, int s, const CanonicalForm & d );
+static CanonicalForm powerMod2( const CanonicalForm & f, mpz_t q, int s, const CanonicalForm & d );
 
 CFFList FpFactorizeUnivariateCZ( const CanonicalForm& f, bool issqrfree, int numext, const Variable alpha, const Variable beta )
@@ -46,5 +46,5 @@
     int d, q, n = 0;
     bool galoisfield = getGFDegree() > 1;
-    MP_INT qq;
+    mpz_t qq;
 
     if ( galoisfield )
@@ -57,6 +57,6 @@
         else
             n = getMipo( alpha ).degree() * getMipo( beta ).degree();
-        mpz_init( &qq );
-        mpz_ui_pow_ui ( &qq, q, n );
+        mpz_init( qq );
+        mpz_ui_pow_ui ( qq, q, n );
     }
     if ( LC( f ).isOne() )
@@ -82,9 +82,9 @@
              if ( numext == 1 ) {
                    AlgExtRandomF tmpalpha( alpha );
-                    HH = CantorZassenhausFactorExt( j.getItem().factor(), j.getItem().exp(), &qq, tmpalpha );
+                    HH = CantorZassenhausFactorExt( j.getItem().factor(), j.getItem().exp(), qq, tmpalpha );
              }
              else {
                    AlgExtRandomF tmpalphabeta( alpha, beta );
-                    HH = CantorZassenhausFactorExt( j.getItem().factor(), j.getItem().exp(), &qq, tmpalphabeta );
+                    HH = CantorZassenhausFactorExt( j.getItem().factor(), j.getItem().exp(), qq, tmpalphabeta );
              }
             }
@@ -100,5 +100,5 @@
     }
     if ( numext > 0 )
-        mpz_clear( &qq );
+        mpz_clear( qq );
     return H;
 }
@@ -171,5 +171,5 @@
 }
 
-CFFList CantorZassenhausFactorExt( const CanonicalForm & g, int s, MP_INT * q, const CFRandom & gen )
+CFFList CantorZassenhausFactorExt( const CanonicalForm & g, int s, mpz_t q, const CFRandom & gen )
 {
     CanonicalForm f = g;
@@ -228,17 +228,17 @@
     int odd;
 
-    MP_INT m;
-
-    mpz_init( &m );
-    mpz_ui_pow_ui ( &m, p, s );
-    while ( mpz_cmp_si( &m, 0 ) != 0 )
+    mpz_t m;
+
+    mpz_init( m );
+    mpz_ui_pow_ui ( m, p, s );
+    while ( mpz_cmp_si( m, 0 ) != 0 )
     {
-        odd = mpz_fdiv_q_ui( &m, &m, 2 );
+        odd = mpz_fdiv_q_ui( m, m, 2 );
         if ( odd != 0 )
             prod = (prod * b) % d;
-        if ( mpz_cmp_si( &m, 0 ) != 0 )
+        if ( mpz_cmp_si( m, 0 ) != 0 )
             b = (b*b) % d;
     }
-    mpz_clear( &m );
+    mpz_clear( m );
     return prod;
 }
@@ -250,23 +250,23 @@
     int odd;
 
-    MP_INT m;
-
-    mpz_init( &m );
-    mpz_ui_pow_ui ( &m, p, s );
-    mpz_sub_ui( &m, &m, 1 );
-    mpz_fdiv_q_ui( &m, &m, 2 );
-    while ( mpz_cmp_si( &m, 0 ) != 0 )
+    mpz_t m;
+
+    mpz_init( m );
+    mpz_ui_pow_ui ( m, p, s );
+    mpz_sub_ui( m, m, 1 );
+    mpz_fdiv_q_ui( m, m, 2 );
+    while ( mpz_cmp_si( m, 0 ) != 0 )
     {
-        odd = mpz_fdiv_q_ui( &m, &m, 2 );
+        odd = mpz_fdiv_q_ui( m, m, 2 );
         if ( odd != 0 )
             prod = (prod * b) % d;
-        if ( mpz_cmp_si( &m, 0 ) != 0 )
+        if ( mpz_cmp_si( m, 0 ) != 0 )
             b = (b*b) % d;
     }
-    mpz_clear( &m );
-    return prod;
-}
-
-CanonicalForm powerMod2( const CanonicalForm & f, MP_INT * q, int s, const CanonicalForm & d )
+    mpz_clear( m );
+    return prod;
+}
+
+CanonicalForm powerMod2( const CanonicalForm & f, mpz_t q, int s, const CanonicalForm & d )
 {
     CanonicalForm prod = 1;
@@ -274,19 +274,19 @@
     int odd;
 
-    MP_INT m;
-
-    mpz_init( &m );
-    mpz_pow_ui( &m, q, s );
-    mpz_sub_ui( &m, &m, 1 );
-    mpz_fdiv_q_ui( &m, &m, 2 );
-    while ( mpz_cmp_si( &m, 0 ) != 0 )
+    mpz_t m;
+
+    mpz_init( m );
+    mpz_pow_ui( m, q, s );
+    mpz_sub_ui( m, m, 1 );
+    mpz_fdiv_q_ui( m, m, 2 );
+    while ( mpz_cmp_si( m, 0 ) != 0 )
     {
-        odd = mpz_fdiv_q_ui( &m, &m, 2 );
+        odd = mpz_fdiv_q_ui( m, m, 2 );
         if ( odd != 0 )
             prod = (prod * b) % d;
-        if ( mpz_cmp_si( &m, 0 ) != 0 )
+        if ( mpz_cmp_si( m, 0 ) != 0 )
             b = (b*b) % d;
     }
-    mpz_clear( &m );
-    return prod;
-}
+    mpz_clear( m );
+    return prod;
+}
