mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
typedef ABI version types
This commit is contained in:
parent
f5c3cda7d6
commit
029871c3fe
1 changed files with 4 additions and 2 deletions
6
dln.c
6
dln.c
|
@ -463,8 +463,10 @@ dln_load(const char *file)
|
|||
void *handle = dln_open(file);
|
||||
|
||||
#ifdef RUBY_DLN_CHECK_ABI
|
||||
unsigned long long (*abi_version_fct)(void) = (unsigned long long(*)(void))dln_sym(handle, "ruby_abi_version");
|
||||
unsigned long long binary_abi_version = (*abi_version_fct)();
|
||||
typedef unsigned long long abi_version_number;
|
||||
typedef abi_version_number abi_version_func(void);
|
||||
abi_version_func *abi_version_fct = (abi_version_func *)dln_sym(handle, "ruby_abi_version");
|
||||
abi_version_number binary_abi_version = (*abi_version_fct)();
|
||||
if (binary_abi_version != ruby_abi_version() && abi_check_enabled_p()) {
|
||||
dln_loaderror("incompatible ABI version of binary - %s", file);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue