2024-02-21 11:14:49 +03:00
|
|
|
// This file is used by miniruby, not ruby.
|
|
|
|
// ruby uses dln.c.
|
|
|
|
|
2010-02-24 03:55:03 +03:00
|
|
|
#include "ruby/ruby.h"
|
|
|
|
|
2024-04-26 22:27:56 +03:00
|
|
|
bool
|
|
|
|
dln_supported_p(void)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-05-08 03:55:28 +03:00
|
|
|
NORETURN(void *dln_load(const char *));
|
2010-02-24 03:55:03 +03:00
|
|
|
void*
|
|
|
|
dln_load(const char *file)
|
|
|
|
{
|
|
|
|
rb_loaderror("this executable file can't load extension libraries");
|
2012-04-14 03:45:37 +04:00
|
|
|
|
2018-07-24 08:38:07 +03:00
|
|
|
UNREACHABLE_RETURN(NULL);
|
2010-02-24 03:55:03 +03:00
|
|
|
}
|
2023-12-07 14:38:53 +03:00
|
|
|
|
|
|
|
NORETURN(void *dln_symbol(void*,const char*));
|
|
|
|
void*
|
|
|
|
dln_symbol(void *handle, const char *symbol)
|
|
|
|
{
|
|
|
|
rb_loaderror("this executable file can't load extension libraries");
|
|
|
|
|
|
|
|
UNREACHABLE_RETURN(NULL);
|
|
|
|
}
|
2024-04-02 15:52:50 +03:00
|
|
|
|
|
|
|
void*
|
2024-04-24 18:01:09 +03:00
|
|
|
dln_open(const char *library, char *error, size_t size)
|
2024-04-02 15:52:50 +03:00
|
|
|
{
|
2024-04-24 18:04:06 +03:00
|
|
|
static const char *error_str = "this executable file can't load extension libraries";
|
|
|
|
strlcpy(error, error_str, size);
|
|
|
|
return NULL;
|
2024-04-02 15:52:50 +03:00
|
|
|
}
|
|
|
|
|