diff options
-rw-r--r-- | libguile/programs.c | 21 | ||||
-rw-r--r-- | module/system/vm/program.scm | 8 |
2 files changed, 12 insertions, 17 deletions
diff --git a/libguile/programs.c b/libguile/programs.c index 9ba361980..7a0127670 100644 --- a/libguile/programs.c +++ b/libguile/programs.c @@ -44,32 +44,31 @@ SCM_DEFINE (scm_program_code, "program-code", 1, 0, 0, SCM scm_i_program_name (SCM program) { - static SCM rtl_program_name = SCM_BOOL_F; + static SCM program_name = SCM_BOOL_F; if (SCM_PRIMITIVE_P (program)) return SCM_SUBR_NAME (program); - if (scm_is_false (rtl_program_name) && scm_module_system_booted_p) - rtl_program_name = - scm_c_private_variable ("system vm program", "rtl-program-name"); + if (scm_is_false (program_name) && scm_module_system_booted_p) + program_name = + scm_c_private_variable ("system vm program", "program-name"); - return scm_call_1 (scm_variable_ref (rtl_program_name), program); + return scm_call_1 (scm_variable_ref (program_name), program); } SCM scm_i_program_documentation (SCM program) { - static SCM rtl_program_documentation = SCM_BOOL_F; + static SCM program_documentation = SCM_BOOL_F; if (SCM_PRIMITIVE_P (program)) return SCM_BOOL_F; - if (scm_is_false (rtl_program_documentation) && scm_module_system_booted_p) - rtl_program_documentation = - scm_c_private_variable ("system vm program", - "rtl-program-documentation"); + if (scm_is_false (program_documentation) && scm_module_system_booted_p) + program_documentation = + scm_c_private_variable ("system vm program", "program-documentation"); - return scm_call_1 (scm_variable_ref (rtl_program_documentation), program); + return scm_call_1 (scm_variable_ref (program_documentation), program); } SCM diff --git a/module/system/vm/program.scm b/module/system/vm/program.scm index da9b7cd7b..d8f201c0b 100644 --- a/module/system/vm/program.scm +++ b/module/system/vm/program.scm @@ -50,14 +50,10 @@ "scm_init_programs") ;; These procedures are called by programs.c. -(define (rtl-program-name program) - (unless (program? program) - (error "shouldn't get here")) +(define (program-name program) (and=> (find-program-debug-info (program-code program)) program-debug-info-name)) -(define (rtl-program-documentation program) - (unless (program? program) - (error "shouldn't get here")) +(define (program-documentation program) (find-program-docstring (program-code program))) (define (rtl-program-minimum-arity program) (unless (program? program) |