Changeset 3ecfa13 for libcfa/src/gmp.hfa


Ignore:
Timestamp:
Feb 8, 2020, 3:21:45 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8c9da33
Parents:
0f5da65 (diff), 74330e7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/gmp.hfa

    r0f5da65 r3ecfa13  
    1010// Created On       : Tue Apr 19 08:43:43 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 13 15:25:05 2019
    13 // Update Count     : 27
     12// Last Modified On : Fri Feb  7 22:10:30 2020
     13// Update Count     : 29
    1414//
    1515
     
    3131        void ?{}( Int & this, signed long int init ) { mpz_init_set_si( this.mpz, init ); }
    3232        void ?{}( Int & this, unsigned long int init ) { mpz_init_set_ui( this.mpz, init ); }
    33         void ?{}( Int & this, const char * val ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
     33        void ?{}( Int & this, const char val[] ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
    3434        void ^?{}( Int & this ) { mpz_clear( this.mpz ); }
    3535
     
    3737        Int ?`mp( signed long int init ) { return (Int){ init }; }
    3838        Int ?`mp( unsigned long int init ) { return (Int){ init }; }
    39         Int ?`mp( const char * init ) { return (Int){ init }; }
     39        Int ?`mp( const char init[] ) { return (Int){ init }; }
    4040
    4141        // assignment
     
    4343        Int ?=?( Int & lhs, long int rhs ) { mpz_set_si( lhs.mpz, rhs ); return lhs; }
    4444        Int ?=?( Int & lhs, unsigned long int rhs ) { mpz_set_ui( lhs.mpz, rhs ); return lhs; }
    45         Int ?=?( Int & lhs, const char * rhs ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { abort | "invalid string conversion"; } return lhs; }
     45        Int ?=?( Int & lhs, const char rhs[] ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { abort | "invalid string conversion"; } return lhs; }
    4646
    4747        char ?=?( char & lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
     
    265265        forall( dtype ostype | ostream( ostype ) ) {
    266266                ostype & ?|?( ostype & os, Int mp ) {
    267                         if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
     267                        if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) );
    268268                        gmp_printf( "%Zd", mp.mpz );
    269269                        sepOn( os );
Note: See TracChangeset for help on using the changeset viewer.