diff options
Diffstat (limited to 'mpi/mpiutil.c')
-rw-r--r-- | mpi/mpiutil.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mpi/mpiutil.c b/mpi/mpiutil.c index 1bf845a32..04e280caa 100644 --- a/mpi/mpiutil.c +++ b/mpi/mpiutil.c @@ -383,7 +383,11 @@ mpi_copy( MPI a ) * with the same flags as A. */ MPI +#ifdef M_DEBUG +mpi_debug_alloc_like( MPI a, const char *info ) +#else mpi_alloc_like( MPI a ) +#endif { MPI b; @@ -394,8 +398,13 @@ mpi_alloc_like( MPI a ) b = mpi_set_opaque( NULL, p, a->nbits ); } else if( a ) { + #ifdef M_DEBUG + b = mpi_is_secure(a)? mpi_debug_alloc_secure( a->nlimbs, info ) + : mpi_debug_alloc( a->nlimbs, info ); + #else b = mpi_is_secure(a)? mpi_alloc_secure( a->nlimbs ) : mpi_alloc( a->nlimbs ); + #endif b->nlimbs = 0; b->sign = 0; b->flags = a->flags; |