mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
78b95b49f8
* 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
16 lines
289 B
C
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
|
|
}
|