From f8099c99778d48858c7036c4736eca7b3b051fb4 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 16 Feb 2025 16:50:29 +0900 Subject: [PATCH] [qfcc] Rename obj_types_assignable This makes it consistent with the other type_assignable functions. --- tools/qfcc/include/class.h | 2 +- tools/qfcc/source/class.c | 2 +- tools/qfcc/source/function.c | 2 +- tools/qfcc/source/stub.c | 2 +- tools/qfcc/source/type.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/qfcc/include/class.h b/tools/qfcc/include/class.h index 7203ea84a..b2c4d96f0 100644 --- a/tools/qfcc/include/class.h +++ b/tools/qfcc/include/class.h @@ -126,7 +126,7 @@ int is_SEL (const struct type_s *type) __attribute__((const)); int is_object (const struct type_s *type) __attribute__((const)); int is_method (const struct type_s *type) __attribute__((const)); int is_method_description (const struct type_s *type) __attribute__((const)); -int obj_types_assignable (const struct type_s *dst, const struct type_s *src); +int obj_type_assignable (const struct type_s *dst, const struct type_s *src); class_t *extract_class (class_type_t *class_type) __attribute__((pure)); 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 62e170545..b76842a7a 100644 --- a/tools/qfcc/source/class.c +++ b/tools/qfcc/source/class.c @@ -571,7 +571,7 @@ category_implements (category_t *cat, protocol_t *protocol) } int -obj_types_assignable (const type_t *dst, const type_t *src) +obj_type_assignable (const type_t *dst, const type_t *src) { class_t *dst_class, *src_class = 0; category_t *cat; diff --git a/tools/qfcc/source/function.c b/tools/qfcc/source/function.c index 8f7f46125..07644cd25 100644 --- a/tools/qfcc/source/function.c +++ b/tools/qfcc/source/function.c @@ -671,7 +671,7 @@ check_type (const type_t *type, callparm_t param, unsigned *cost, bool promote) if (type_same (type, param.type)) { return true; } - int ret = obj_types_assignable (type, param.type); + int ret = obj_type_assignable (type, param.type); if (ret >= 0) { return ret; } diff --git a/tools/qfcc/source/stub.c b/tools/qfcc/source/stub.c index 2b348eedd..0a8fb9ab0 100644 --- a/tools/qfcc/source/stub.c +++ b/tools/qfcc/source/stub.c @@ -60,7 +60,7 @@ __attribute__((const)) symbol_t *make_structure (const char *name, int su, struc __attribute__((const)) symbol_t *symtab_addsymbol (symtab_t *symtab, symbol_t *symbol) {return 0;} __attribute__((const)) symbol_t *new_symbol_type (const char *name, const type_t *type) {return 0;} __attribute__((const)) def_t *qfo_encode_type (const type_t *type, defspace_t *space) {return 0;} -__attribute__((const)) int obj_types_assignable (const type_t *dst, const type_t *src) {return 0;} +__attribute__((const)) int obj_type_assignable (const type_t *dst, const type_t *src) {return 0;} void print_protocollist (struct dstring_s *dstr, protocollist_t *protocollist) {} void defspace_sort_defs (defspace_t *space) {} int is_id (const type_t *type){return type->type;} diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index ce0915928..d94c061d8 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -1758,8 +1758,8 @@ type_assignable (const type_t *dst, const type_t *src) // pointer = pointer // give the object system first shot because the pointee types might have // protocols attached. - int ret = obj_types_assignable (dst, src); - // ret < 0 means obj_types_assignable can't decide + int ret = obj_type_assignable (dst, src); + // ret < 0 means obj_type_assignable can't decide if (ret >= 0) return ret;