Skip to content
  • Alan Wu's avatar
    12e6cf77
    Add "c_long_size" guard, supplanting "wordsize" and stop using Integer#size · 12e6cf77
    Alan Wu authored
    What a "word" is when talking about sizes is confusing because it's a
    highly overloaded term. Intel, Microsoft, and GDB are just a few vendors
    that have their own definition of what a "word" is. Specs that used the
    "wordsize" guard actually were mostly testing for the size of the C
    `long` fundamental type, so rename the guard for clarity.
    
    Also, get the size of `long` directly from RbConfig instead of guessing
    using Integer#size. Integer#size is not guaranteed to have anything to
    do with the `long` type.
    12e6cf77
    Add "c_long_size" guard, supplanting "wordsize" and stop using Integer#size
    Alan Wu authored
    What a "word" is when talking about sizes is confusing because it's a
    highly overloaded term. Intel, Microsoft, and GDB are just a few vendors
    that have their own definition of what a "word" is. Specs that used the
    "wordsize" guard actually were mostly testing for the size of the C
    `long` fundamental type, so rename the guard for clarity.
    
    Also, get the size of `long` directly from RbConfig instead of guessing
    using Integer#size. Integer#size is not guaranteed to have anything to
    do with the `long` type.
Loading