mruby/mruby — pull request #1721 by take-cheeze (2014-02-21 09:09:38+00:00)
Title: add 'd' format specifier in mrb_get_args and mruby-random gem improvement

This new `'d'` format specifier can be used to get data pointer from `RData` without temporary `mrb_value` with type checking.
It requires two arguments: `[void**, struct mrb_data_type const*]`.
1st will be used to return result, 2nd will be used to check type.
When the argument's type doesn't match it will raise `TypeError` since it use `mrb_data_check_type` internally.

https://github.com/take-cheeze/mruby/commit/f863025bd6402b5d52bb172234f5794c064910f5 is the example of howto use `'d'` format specifier using *mruby-random* gem.
In additional `mrb_intern` is replaced with `mrb_intern_lit` to avoid macros.