Use friendlier terminology in leaf helpers

[Fix GH-2009]

From: Juanito Fatas <juanito.fatas@shopify.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-11-11 01:25:33 +00:00
parent ab97298a22
commit c8e8f4dbab

View File

@ -18,7 +18,7 @@ leafness_of_getglobal(VALUE gentry)
else { else {
/* We cannot write this function using a switch() because a /* We cannot write this function using a switch() because a
* case label cannot be a function pointer. */ * case label cannot be a function pointer. */
static rb_gvar_getter_t *const whitelist[] = { static rb_gvar_getter_t *const allowlist[] = {
rb_gvar_val_getter, rb_gvar_val_getter,
rb_gvar_var_getter, rb_gvar_var_getter,
rb_gvar_undef_getter, rb_gvar_undef_getter,
@ -26,8 +26,8 @@ leafness_of_getglobal(VALUE gentry)
rb_gvar_getter_t *f = rb_gvar_getter_function_of(e); rb_gvar_getter_t *f = rb_gvar_getter_function_of(e);
int i; int i;
for (i = 0; i < numberof(whitelist); i++) { for (i = 0; i < numberof(allowlist); i++) {
if (f == whitelist[i]) { if (f == allowlist[i]) {
return true; return true;
} }
} }
@ -46,7 +46,7 @@ leafness_of_setglobal(VALUE gentry)
else { else {
/* We cannot write this function using a switch() because a /* We cannot write this function using a switch() because a
* case label cannot be a function pointer. */ * case label cannot be a function pointer. */
static rb_gvar_setter_t *const whitelist[] = { static rb_gvar_setter_t *const allowlist[] = {
rb_gvar_val_setter, rb_gvar_val_setter,
rb_gvar_readonly_setter, rb_gvar_readonly_setter,
rb_gvar_var_setter, rb_gvar_var_setter,
@ -55,8 +55,8 @@ leafness_of_setglobal(VALUE gentry)
rb_gvar_setter_t *f = rb_gvar_setter_function_of(e); rb_gvar_setter_t *f = rb_gvar_setter_function_of(e);
int i; int i;
for (i = 0; i < numberof(whitelist); i++) { for (i = 0; i < numberof(allowlist); i++) {
if (f == whitelist[i]) { if (f == allowlist[i]) {
return true; return true;
} }
} }