Changeset 0a6f36 in git for factory/cf_factory.cc


Ignore:
Timestamp:
Oct 28, 2020, 11:49:49 AM (3 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
1950d7ac77c33b4a0454f61ac82599d8eace0d48
Parents:
2fb01f7e774076d3244a324901f61c3c34260054
Message:
fix: 32bit factory
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_factory.cc

    r2fb01f r0a6f36  
    5858}
    5959
    60 #if SIZEOF_LONG == 8
    6160InternalCF *
    6261CFFactory::basic ( int value )
     
    6564  {
    6665    case IntegerDomain:
    67             return int2imm( value );
    68 //     else  if ( currenttype == RationalDomain )
    69 //         if ( value >= MINIMMEDIATE && value <= MAXIMMEDIATE )
    70 //             return int2imm( value );
    71 //         else
    72 //             return new InternalRational( value );
     66#if SIZEOF_LONG == 8
     67            return int2imm( value );
     68#else
     69        if (LIKELY( value >= MINIMMEDIATE && value <= MAXIMMEDIATE ))
     70            return int2imm( value );
     71        else
     72            return new InternalInteger( value );
     73#endif
     74    case RationalDomain:
     75#if SIZEOF_LONG == 8
     76            return int2imm( value );
     77#else
     78        if (LIKELY( value >= MINIMMEDIATE && value <= MAXIMMEDIATE ))
     79            return int2imm( value );
     80        else
     81            return new InternalRational( value );
     82#endif
    7383    case FiniteFieldDomain:
    7484        return int2imm_p( ff_norm( value ) );
     
    8595  }
    8696}
    87 #endif
    8897
    8998InternalCF *
Note: See TracChangeset for help on using the changeset viewer.