Changeset 1154


Ignore:
Timestamp:
Aug 11, 2003, 2:09:34 PM (17 years ago)
Author:
luba
Message:
  • calling setlocale in Time is taken to Init;
  • type of argument of cmp function in Integer class is changed to
  • unsigned long (for correct work of cmp with unsigned numbers, SIZE_MAX);
Location:
to-imperative/trunk/runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/runtime/rf_core.cc

    r1150 r1154  
    6666    s = getenv("LC_CTYPE");
    6767    if (s != null) setlocale(LC_CTYPE, s);
     68    s = getenv("LC_TIME");
     69    if (s != null) setlocale(LC_TIME, s);
    6870    s = getenv("LC_ALL");
    6971    if (s != null) setlocale(LC_ALL, s);
  • to-imperative/trunk/runtime/rf_integer.hh

    r1117 r1154  
    3131  inline bool operator == (intptr_t _n) const ;
    3232  inline int cmp (Integer const& _n) const ;
    33   inline int cmp (intptr_t _n) const ;
     33  inline int cmp (unsigned long _n) const ;
    3434
    3535  inline Integer operator + (Integer const& _n) const ;
  • to-imperative/trunk/runtime/rf_integer.ih

    r1117 r1154  
    102102}
    103103
    104 inline int Integer::cmp (intptr_t _n) const
    105 {
    106   mpz_t* p = static_cast<mpz_t*>(ptr_data2);
    107   return mpz_cmp_si(*p, _n);
     104inline int Integer::cmp (unsigned long _n) const
     105{
     106  mpz_t* p = static_cast<mpz_t*>(ptr_data2);
     107  return mpz_cmp_ui(*p, _n);
    108108}
    109109
Note: See TracChangeset for help on using the changeset viewer.