mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby.h: fix build with MRB_NO_METHOD_CACHE
mrb_method_cache_clear() was called unconditionally from class.c and state.c, but the function definition was guarded by MRB_NO_METHOD_CACHE. This caused linker errors when building with MRB_NO_METHOD_CACHE defined. Add empty macro definition when MRB_NO_METHOD_CACHE is defined, matching the existing pattern used for mrb_mc_clear_by_class(). Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1268,7 +1268,11 @@ MRB_API mrb_state* mrb_open_core(void);
|
||||
* Pointer to the mrb_state to be closed.
|
||||
*/
|
||||
MRB_API void mrb_close(mrb_state *mrb);
|
||||
#ifndef MRB_NO_METHOD_CACHE
|
||||
MRB_API void mrb_method_cache_clear(mrb_state *mrb);
|
||||
#else
|
||||
#define mrb_method_cache_clear(mrb) ((void)0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check if mrb_open() failed
|
||||
|
||||
Reference in New Issue
Block a user