From 7a6abd4f8eca56a2bba7e7d0b8dfa3011586a89c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 21 Feb 2025 14:59:14 -0500 Subject: Tweak function registration API --- stdlib/functiontype.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'stdlib/functiontype.h') diff --git a/stdlib/functiontype.h b/stdlib/functiontype.h index 4dfef3b0..9252f5fc 100644 --- a/stdlib/functiontype.h +++ b/stdlib/functiontype.h @@ -1,15 +1,19 @@ #pragma once #include +#include #include "metamethods.h" +#include "optionals.h" #include "types.h" #include "util.h" // Logic for handling function type values -void register_function(void *fn, Text_t name); -Text_t *get_function_name(void *fn); +void register_function(void *fn, Text_t filename, int64_t line_num, Text_t name); +OptionalText_t get_function_name(void *fn); +OptionalText_t get_function_filename(void *fn); +int64_t get_function_line_num(void *fn); Text_t Func$as_text(const void *fn, bool colorize, const TypeInfo_t *type); PUREFUNC bool Func$is_none(const void *obj, const TypeInfo_t*); -- cgit v1.2.3