summaryrefslogtreecommitdiff
path: root/py/scope.c
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@mailme.dk>2020-10-03 10:42:57 +0200
committerEmil Renner Berthing <esmil@mailme.dk>2020-10-22 11:40:56 +0200
commit6324c3e05499a31c5a80ad58f030e693f459f294 (patch)
treed0f6c03319962d5e9156dc828b3f58cef8fcfe21 /py/scope.c
parent6eebdbc495a52d1965d7e9255816db310041f96a (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.c2
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;