1. 02 Aug, 2019 1 commit
    • KOBAYASHI Shuji's avatar
      Change the `mrb_vformat` specifier `%d` for `int` · d1817e77
      KOBAYASHI Shuji authored
      It potentially breaks, for example, in the case of `mrb_int` is 64-bit
      and more smaller type is passed by `%d`. In fact, the problem could
      become apparent when I used `%d` to `backtrace_location::lineno` in
      `src/backtrace.c:mrb_unpack_backtrace()` on AppVeyor.
      
      Therefore, change `%d` for `int` (not `mrb_int`) so that it can be
      used mostly without casting.
      d1817e77
  2. 01 Aug, 2019 2 commits
    • Yukihiro "Matz" Matsumoto's avatar
      Merge pull request #4608 from shuujii/add-new-specifiers-modifiers-to-format-string-of-mrb_vfromat · 3bacc302
      Yukihiro "Matz" Matsumoto authored
      Add new specifiers/modifiers to format string of `mrb_vfromat()`
      3bacc302
    • KOBAYASHI Shuji's avatar
      Add new specifiers/modifiers to format string of `mrb_vfromat()` · eea42e06
      KOBAYASHI Shuji authored
      Format sequence syntax:
      
        %[modifier]specifier
      
      Modifiers:
      
        ----------+------------------------------------------------------------
        Modifier  | Meaning
        ----------+------------------------------------------------------------
            !     | Convert to string by corresponding `inspect` instead of
                  | corresponding `to_s`.
        ----------+------------------------------------------------------------
      
      Specifiers:
      
        ----------+----------------+--------------------------------------------
        Specifier | Argument Type  | Note
        ----------+----------------+--------------------------------------------
            c     | char           |
           d,i    | mrb_int        |
            f     | mrb_float      |
            l     | char*, mrb_int | Arguments are string and length.
            n     | mrb_sym        |
            s     | char*          | Argument is NUL terminated string.
            t     | mrb_value      | Convert to type (class) of object.
           v,S    | mrb_value      |
            C     | struct RClass* |
            T     | mrb_value      | Convert to real type (class) of object.
            Y     | mrb_value      | Same as `!v` if argument is `true`, `false`
                  |                | or `nil`, otherwise same as `T`.
            %     | -              | Convert to percent sign itself (no argument
                  |                | taken).
        ----------+----------------+--------------------------------------------
      
      This change will increase the binary size, but replacing all format strings
      with new specifiers/modifiers will decrease the size because it reduces
      inline expansion of `mrb_obj_value()`, etc. at the caller.
      eea42e06
  3. 31 Jul, 2019 2 commits
  4. 30 Jul, 2019 7 commits
  5. 29 Jul, 2019 4 commits
  6. 28 Jul, 2019 10 commits
  7. 27 Jul, 2019 8 commits
  8. 26 Jul, 2019 1 commit
  9. 25 Jul, 2019 2 commits
  10. 24 Jul, 2019 3 commits