dln_symbol: make dln_sym accessible Ruby internally

The symbol resolved by dln_symbol will eventually be passed to
extensions. The error handling of dln_sym is also separated into
dln_sym_func because the new call resolving symbols will not raise
LoadError.
This commit is contained in:
Satoshi Tagomori 2023-12-07 20:38:53 +09:00 committed by Nobuyoshi Nakada
parent 35a6b69f6c
commit 8a37df8c8b
3 changed files with 61 additions and 23 deletions

1
dln.h
View file

@ -25,6 +25,7 @@ RUBY_SYMBOL_EXPORT_BEGIN
char *dln_find_exe_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
char *dln_find_file_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
void *dln_load(const char*);
void *dln_symbol(void*,const char*);
RUBY_SYMBOL_EXPORT_END