struct MEMO now free from ANYARGS

After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct.  There is only one usage of
MEMO::u3::func in load.c (where void Init_Foobar(vodi) is registered)
so why not just be explicit.
This commit is contained in:
卜部昌平 2019-08-27 12:29:00 +09:00
parent 79d280a5e8
commit bd8dc2561d
2 changed files with 2 additions and 2 deletions

View File

@ -1245,7 +1245,7 @@ struct MEMO {
long cnt;
long state;
const VALUE value;
VALUE (*func)(ANYARGS);
void (*func)(void);
} u3;
};

2
load.c
View File

@ -728,7 +728,7 @@ load_lock(const char *ftptr)
}
else if (imemo_type_p(data, imemo_memo)) {
struct MEMO *memo = MEMO_CAST(data);
void (*init)(void) = (void (*)(void))memo->u3.func;
void (*init)(void) = memo->u3.func;
data = (st_data_t)rb_thread_shield_new();
st_insert(loading_tbl, (st_data_t)ftptr, data);
(*init)();