1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/template/extinit.c.tmpl
nobu 78b95b49f8 template/extinit.c.tmpl
* template/extinit.c.tmpl: separate from ext/extmk.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-22 12:50:36 +00:00

16 lines
289 B
C

%# -*- 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
}