1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/enc/encinit.c.erb

27 lines
593 B
Text
Raw Normal View History

/* Copyright 2012 Google Inc. Some Rights Reserved.
* Author: yugui@google.com (Yugui Sonoda)
*/
#include <stdio.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_enc(void)
{
% ENCS.each do |enc|
init(Init_<%= enc %>, "enc/<%= enc %>.so");
% end
init(Init_transdb, "enc/trans/transdb.so");
% TRANS.each do |trans|
% next if trans == 'trans/transdb'
init(Init_trans_<%= File.basename trans %>, "enc/<%= trans %>.so");
% end
}
<%# vim: set ft=eruby sw=2 : -%>