aboutsummaryrefslogtreecommitdiffstats
path: root/template/extinit.c.tmpl
blob: 592eb0452f2268978317fa9e7fb3e172e38c2a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%# -*- C -*-
#include "ruby/ruby.h"

#define init(func, name) {	\
    extern void func(void);	\
    ruby_init_ext(name, func);	\
}

void ruby_init_ext(const char *name, void (*init)(void));

void Init_ext(void)
{
% ARGV.each do |n|
    init(Init_<%=n.sub(/,(.*)/, ', "\1.so"')%>);
% end
}