C++ get_args() #5431
Replies: 3 comments 1 reply
|
I know only old C++. I didn't know we can do such a thing. Impressive & magical. |
|
It's powerful, but sadly pretty unreadable. |
|
Ive written something which turns most c++ objects into mruby objects, its cool how c++ can do most of that at compile time so its virtually free at runtime. https://github.com/Asmod4n/mruby-c-ext-helpers/blob/master/include/mruby/cpp_to_mrb_value.hpp Ive also written a small wrapper so you can turn a c++ class into a mruby MRB_TT_DATA with automatic cleanup https://github.com/Asmod4n/mruby-c-ext-helpers/blob/master/include/mruby/cpp_helpers.hpp Oh and automatic conversion of any number type into the correct mruby number type. https://github.com/Asmod4n/mruby-c-ext-helpers/blob/master/include/mruby/num_helpers.hpp (sadly have to use mruby/internal.h here since the bigint stuff is hidden there. Happy hacking :3 |
Uh oh!
There was an error while loading. Please reload this page.
I am working on making it easier to bind C++ code to MRuby.
Here is a part of it, a function for extracting arguments;
Typical usage;
(Automatically builds the argument string according to the types and creates a tuple).
All reactions