mruby/mruby — pull request #971 by cremno (2013-03-08 17:30:57+00:00)
Title: define and use print format macros for mrb_int

This is mainly for portability. For example: %ld can't be used to print a 64-bit mrb_int on WIN(32|64) because long is 32-bit wide.

We had MRB_INT_FORMAT but it's gone and I think it's better if such macros follow a naming convention (see [1]). Additionally I defined some macros for other formats (oct, hex). They're not used in mruby but they might be helpful for someone else.

[1] But there's an exception: I decided to suffix them with MRB_INT (PRIdMRB_INT) for clarity but only MRB would be fine too for me and it's also shorter. If you think MRB is clear enough, I'll change it.