From d24216d5e980cd3b90df913f2f9c883c96a93d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Fri, 8 May 2026 20:59:58 +0200 Subject: [PATCH] clos: rename si_generic_function_p -> si_funcallable_object_p To better reflect the predicate nature. --- src/c/clos/gfun.d | 5 +++-- src/c/symbols_list.h | 2 +- src/h/external.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/c/clos/gfun.d b/src/c/clos/gfun.d index a8cea2aa1..98631cc80 100644 --- a/src/c/clos/gfun.d +++ b/src/c/clos/gfun.d @@ -85,9 +85,10 @@ clos_set_funcallable_instance_function(cl_object x, cl_object function_or_t) } cl_object -si_generic_function_p(cl_object x) +si_funcallable_object_p(cl_object x) { - @(return ((ECL_INSTANCEP(x) && (x->instance.isgf))? ECL_T : ECL_NIL)); + cl_env_ptr the_env = ecl_process_env(); + ecl_return1(the_env, (ECL_FUNCALLABLE_P(x) ? ECL_T : ECL_NIL)); } static cl_object diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index 2a6992e8e..8efcc8941 100644 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -1314,7 +1314,7 @@ cl_symbols[] = { {SYS_ "WRITE-UGLY-OBJECT" ECL_FUN("si_write_ugly_object", si_write_ugly_object, 2) ECL_VAR(SI_SPECIAL, OBJNULL)}, {SYS_ "COPY-INSTANCE" ECL_FUN("si_copy_instance", si_copy_instance, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, -{SYS_ "GENERIC-FUNCTION-P" ECL_FUN("si_generic_function_p", si_generic_function_p, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, +{SYS_ "FUNCALLABLE-OBJECT-P" ECL_FUN("si_funcallable_object_p", si_funcallable_object_p, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, {SYS_ "INSTANCE-REF" ECL_FUN("si_instance_ref", si_instance_ref, 2) ECL_VAR(SI_ORDINARY, OBJNULL)}, {SYS_ "INSTANCE-SET" ECL_FUN("si_instance_set", si_instance_set, 3) ECL_VAR(SI_ORDINARY, OBJNULL)}, {SYS_ "INSTANCE-OBSOLETE-P" ECL_FUN("si_instance_obsolete_p", si_instance_obsolete_p, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, diff --git a/src/h/external.h b/src/h/external.h index c4be0e7ad..a5280aca4 100755 --- a/src/h/external.h +++ b/src/h/external.h @@ -808,7 +808,7 @@ extern ECL_API cl_object si_gc_stats(cl_object enable); extern ECL_API void _ecl_set_method_hash_size(cl_env_ptr env, cl_index size); extern ECL_API cl_object si_clear_gfun_hash(cl_object what); extern ECL_API cl_object clos_set_funcallable_instance_function(cl_object x, cl_object function_or_t); -extern ECL_API cl_object si_generic_function_p(cl_object instance); +extern ECL_API cl_object si_funcallable_object_p(cl_object instance); extern ECL_API cl_object _ecl_standard_dispatch(cl_object frame, cl_object fun);