mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 06:07:00 +00:00
expr: small code shrink
This commit is contained in:
parent
679b41237c
commit
c6753c1666
@ -277,12 +277,15 @@ static VALUE *eval7(void)
|
|||||||
|
|
||||||
static VALUE *eval6(void)
|
static VALUE *eval6(void)
|
||||||
{
|
{
|
||||||
VALUE *l, *r, *v = NULL /* silence gcc */, *i1, *i2;
|
|
||||||
static const char * const keywords[] = {
|
static const char * const keywords[] = {
|
||||||
"quote", "length", "match", "index", "substr", NULL
|
"quote", "length", "match", "index", "substr", NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
smalluint key = *G.args ? index_in_str_array(keywords, *G.args) + 1 : 0;
|
VALUE *r, *i1, *i2;
|
||||||
|
VALUE *l = l; /* silence gcc */
|
||||||
|
VALUE *v = v; /* silence gcc */
|
||||||
|
int key = *G.args ? index_in_str_array(keywords, *G.args) + 1 : 0;
|
||||||
|
|
||||||
if (key == 0) /* not a keyword */
|
if (key == 0) /* not a keyword */
|
||||||
return eval7();
|
return eval7();
|
||||||
G.args++; /* We have a valid token, so get the next argument. */
|
G.args++; /* We have a valid token, so get the next argument. */
|
||||||
|
Loading…
Reference in New Issue
Block a user