Update mruby api.
This commit is contained in:
@@ -16,12 +16,6 @@
|
||||
#name, { name##_parse, name##_state_match } \
|
||||
}
|
||||
|
||||
struct CustomState {
|
||||
mrb_value state;
|
||||
CustomState(mrb_value s) : state(s) { mrb_gc_register(mrb, state); }
|
||||
~CustomState() { mrb_gc_unregister(mrb, state); }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline std::shared_ptr<T> ensure_state(std::shared_ptr<T> state) {
|
||||
using U = typename T::full_state_type;
|
||||
|
||||
Reference in New Issue
Block a user