diff options
| author | Emil Renner Berthing <esmil@mailme.dk> | 2020-10-03 10:42:57 +0200 |
|---|---|---|
| committer | Emil Renner Berthing <esmil@mailme.dk> | 2020-10-22 11:40:56 +0200 |
| commit | 6324c3e05499a31c5a80ad58f030e693f459f294 (patch) | |
| tree | d0f6c03319962d5e9156dc828b3f58cef8fcfe21 /py/scope.c | |
| parent | 6eebdbc495a52d1965d7e9255816db310041f96a (diff) | |
py/scope: Name and use id_kind_type_t.
The function scope_find_or_add_id used to take a scope_kind_t enum and
save it in an uint8_t. Saving an enum in a uint8_t is fine, but
everywhere this function is called it is not actually given a
scope_kind_t but an anonymous enum instead. Let's give this enum a name
and use that as the argument type.
This doesn't change the generated code, but is a C type mismatch that
unfortunately doesn't show up unless you enable -Wenum-conversion.
Diffstat (limited to 'py/scope.c')
| -rw-r--r-- | py/scope.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/scope.c b/py/scope.c index 073c2a38c..98e02fb53 100644 --- a/py/scope.c +++ b/py/scope.c @@ -72,7 +72,7 @@ void scope_free(scope_t *scope) { m_del(scope_t, scope, 1); } -id_info_t *scope_find_or_add_id(scope_t *scope, qstr qst, scope_kind_t kind) { +id_info_t *scope_find_or_add_id(scope_t *scope, qstr qst, id_info_kind_t kind) { id_info_t *id_info = scope_find(scope, qst); if (id_info != NULL) { return id_info; |
