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:
parent
79d280a5e8
commit
bd8dc2561d
@ -1245,7 +1245,7 @@ struct MEMO {
|
|||||||
long cnt;
|
long cnt;
|
||||||
long state;
|
long state;
|
||||||
const VALUE value;
|
const VALUE value;
|
||||||
VALUE (*func)(ANYARGS);
|
void (*func)(void);
|
||||||
} u3;
|
} u3;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
2
load.c
2
load.c
@ -728,7 +728,7 @@ load_lock(const char *ftptr)
|
|||||||
}
|
}
|
||||||
else if (imemo_type_p(data, imemo_memo)) {
|
else if (imemo_type_p(data, imemo_memo)) {
|
||||||
struct MEMO *memo = MEMO_CAST(data);
|
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();
|
data = (st_data_t)rb_thread_shield_new();
|
||||||
st_insert(loading_tbl, (st_data_t)ftptr, data);
|
st_insert(loading_tbl, (st_data_t)ftptr, data);
|
||||||
(*init)();
|
(*init)();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user