Skip to content
Snippets Groups Projects
  • Damien George's avatar
    f75c7ad1
    py/mpz: In mpz_clone, remove unused check for NULL dig. · f75c7ad1
    Damien George authored
    This path for src->deg==NULL is never used because mpz_clone() is always
    called with an argument that has a non-zero integer value, and hence has
    some digits allocated to it (mpz_clone() is a static function private to
    mpz.c all callers of this function first check if the integer value is zero
    and if so take a special-case path, bypassing the call to mpz_clone()).
    
    There is some unused and commented-out functions that may actually pass a
    zero-valued mpz to mpz_clone(), so some TODOs are added to these function
    in case they are needed in the future.
    f75c7ad1
    History
    py/mpz: In mpz_clone, remove unused check for NULL dig.
    Damien George authored
    This path for src->deg==NULL is never used because mpz_clone() is always
    called with an argument that has a non-zero integer value, and hence has
    some digits allocated to it (mpz_clone() is a static function private to
    mpz.c all callers of this function first check if the integer value is zero
    and if so take a special-case path, bypassing the call to mpz_clone()).
    
    There is some unused and commented-out functions that may actually pass a
    zero-valued mpz to mpz_clone(), so some TODOs are added to these function
    in case they are needed in the future.