Changeset 37722 in project


Ignore:
Timestamp:
06/21/19 22:31:52 (4 weeks ago)
Author:
sjamaan
Message:

srfi-69: Make eq?-hash and keyword-hash return the same value on both 5.0.0 and 5.1.0

Because these are now distinct types, we need to treat them differently

Thanks to Kon Lovett

Location:
release/5/srfi-69/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-69/trunk/srfi-69.scm

    r36455 r37722  
    265265  (or (%immediate? obj)
    266266       (symbol? obj)
    267        #; ;NOT YET (no keyword vs. symbol issue)
    268267       (keyword? obj) ) )
    269268
     
    276275        [(eof-object? obj)      (fxxor eof-hash-value rnd)]
    277276        [(symbol? obj)          (%symbol-hash obj rnd)]
    278         #; ;NOT YET (no keyword vs. symbol issue)
    279277        [(keyword? obj)         (%keyword-hash obj rnd)]
    280278        [(%immediate? obj)      (fxxor unknown-immediate-hash-value rnd)]
     
    302300        [(eof-object? obj)      (fxxor eof-hash-value rnd)]
    303301        [(symbol? obj)          (%symbol-hash obj rnd)]
    304         #; ;NOT YET (no keyword vs. symbol issue)
    305302        [(keyword? obj)         (%keyword-hash obj rnd)]
    306303        [(number? obj)          (%non-fixnum-number-hash obj rnd)]
     
    381378          [(eof-object? obj)      (fxxor eof-hash-value rnd)]
    382379          [(symbol? obj)          (%symbol-hash obj rnd)]
    383           #; ;NOT YET (no keyword vs. symbol issue)
    384380          [(keyword? obj)         (%keyword-hash obj rnd)]
    385381          [(flonum? obj)          (%non-fixnum-number-hash obj rnd)]
  • release/5/srfi-69/trunk/tests/hash-table-tests.scm

    r36455 r37722  
    247247      (print hsh1 " <?> " hsh2)
    248248      (assert (not (= hsh1 hsh2))) ) ) )
     249
     250;;keyword vs. symbol issue
     251(assert (= (keyword-hash #:foo) (eq?-hash #:foo)))
     252(assert (= (keyword-hash #:foo) (eqv?-hash #:foo)))
     253(assert (= (keyword-hash #:foo) (equal?-hash #:foo)))
Note: See TracChangeset for help on using the changeset viewer.