aboutsummaryrefslogtreecommitdiffstats
path: root/dmydln.c
blob: 84e8a2b381f244329cb099a87fbab3d0ac35b653 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// This file is used by miniruby, not ruby.
// ruby uses dln.c.

#include "ruby/ruby.h"

NORETURN(void *dln_load(const char *));
void*
dln_load(const char *file)
{
    rb_loaderror("this executable file can't load extension libraries");

    UNREACHABLE_RETURN(NULL);
}

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);
}

void*
dln_open(const char *library, char *error, size_t size)
{
    static const char *error_str = "this executable file can't load extension libraries";
    strlcpy(error, error_str, size);
    return NULL;
}