diff --git a/tools/qfcc/include/class.h b/tools/qfcc/include/class.h index e0285a7ca..e8de7f888 100644 --- a/tools/qfcc/include/class.h +++ b/tools/qfcc/include/class.h @@ -107,7 +107,7 @@ struct expr_s; struct method_s; struct symbol_s; -int is_id (const struct type_s *type); +int obj_is_id (const struct type_s *type); class_t *extract_class (class_type_t *class_type); const char *get_class_name (class_type_t *class_type, int pretty); diff --git a/tools/qfcc/source/class.c b/tools/qfcc/source/class.c index f659894e0..5bcc50e1d 100644 --- a/tools/qfcc/source/class.c +++ b/tools/qfcc/source/class.c @@ -174,7 +174,7 @@ static struct_def_t object_struct[] = { }; int -is_id (const type_t *type) +obj_is_id (const type_t *type) { if (type == &type_id) return 1; diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index d9ca19fa4..a8b9f7ada 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -443,7 +443,7 @@ print_type_str (dstring_t *str, const type_t *type) } break; case ev_pointer: - if (is_id (type)) { + if (obj_is_id (type)) { dasprintf (str, "id"); if (type->t.fldptr.type->protos) print_protocollist (str, type->t.fldptr.type->protos); @@ -724,11 +724,11 @@ type_assignable (const type_t *dst, const type_t *src) if (dst->type == ev_field && src->type == ev_field) return 1; // id = any class pointer - if (is_id (dst) && src->type == ev_pointer + if (obj_is_id (dst) && src->type == ev_pointer && (is_class (src->t.fldptr.type) || src == &type_Class)) return 1; // any class pointer = id - if (is_id (src) && dst->type == ev_pointer + if (obj_is_id (src) && dst->type == ev_pointer && (is_class (dst->t.fldptr.type) || dst == &type_Class)) return 1; // pointer = array